Hi Guys
Some wisdom please...
I have a sitatuion where I have an Editable Root with an Editable Child collection haning off it. I have UI design where I am displaying the children collection in a DataGridView - as a read only view of the collection. I have typical Add/Edit buttons where the user can select a child object, click the Edit button then go to a modal dialog to edit it, or click the Add button and add a new object.
My code on Add is basically something like:
ero.BeginEdit();
ChildClass child = ero.Children.AddNew(); ChildPropertiesForm form = new ChildPropertiesForm(child); if (form.ShowDialog() == DialogResult.OK)ero.ApplyEdit();
elseero.CancelEdit();
All works fine.
However, my bugbear is that I'm present a modal dialog to the user and the user's expectation is that the changes they're making won't happen until they click OK. But, as they're changing fields on the modal dialog form they can see the changing happening in the DataGridView sitting behind in on the parent form.
Is there any easy way to prevent this from happening? I know that what is happening underneath is just being shown in the bound DataGridView but it seems a little weird from the user's perspective. I've tried doing things like calling SuspendBinding, but it has no effect (though I wouldn't yet claim to be an expert a data binding).
Any guidance much appreciated.
Thanks,
Craig
P.S. CSLA 2.1
Thanks Brian
Disabling the list changed events worked fine for me.
Craig
Copyright (c) Marimer LLC