Hello all,
I am trialing the Infragistics as well as learning EntitySpaces, life is better when it is full. Anyway I have the grid working wonderfully with the exception of attempting to save my current cell.
Here is what I see,
If I modify a field and attempt to close the form it does not detect any changes, if I click the Save button nothing is saved.
If I modify a field, move to the next field and attempt to close the form it does not detect any changes, if I click the Save button the field is saved.
If I modify a field, move to the next row and attempt to close the form it detects my changes, if I click the Save button the field is saved.
I am not sure if this is Infragistics or EntitySpaces as I am new to both, hopefully you could give me a little insight here as to what is going on?
The relevant code is pasted below.
Thanks,
Nigel
public partial class frmUsers : Form
{
private UserCollection userCollection1 = new UserCollection();
private void frmUsers_Load(object sender, EventArgs e)
{
userCollection1.LoadAll();
//Connect the bindingsource to my user collection.
userCollectionBindingSource.DataSource = userCollection1;
//Setup the Infragistics combo box for user property - GridType
gridTypeCollection1.LoadAll();
ultraGridUsers.DisplayLayout.ValueLists.Add(
"GridType");
foreach (GridType GridItm in gridTypeCollection1)
{
ultraGridUsers.DisplayLayout.ValueLists["GridType"].ValueListItems.Add(GridItm.GridType, GridItm.GridTypeDescr);
}
ultraGridUsers.DisplayLayout.Bands[0].Columns["GridType"].ValueList =
ultraGridUsers.DisplayLayout.ValueLists["GridType"];
}
private void userCollectionBindingNavigatorSaveItem_Click(object sender, EventArgs e)
{
Validate();
userCollectionBindingSource.EndEdit();
userCollection1.Save();
}
private void frmUsers_FormClosing(object sender, FormClosingEventArgs e)
{
if (userCollection1.IsDirty)
{
if (MessageBox.Show("Unsaved changes, close form?","Logistics", MessageBoxButtons.YesNo, MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2)!=System.Windows.Forms.DialogResult.Yes)
{
e.Cancel = true;
}
}
}