BindingSource's CancelEdit doesn't work after navigating away
I have a DataGridView bound to a BindingSource which has a collection
of objects as its data source. On the form, I have an Undo button. In
the button I have:
BindingSource1.RaiseListChangedEvents = False
BindingSource1.CancelEdit()
BindingSource1.RaiseListChangedEvents = True
I have two issues with it.
1- If I dirty a record in the grid, navigate to a new record, and then
click Undo, the CancelEdit call does not revert the changed value.
2- If I don't navigate away, it does revert the changed value, but it
is excruciatingly slow.
The first issue is more critical, at this point. Any help is
appreciated.
Date:Thu, 26 Jul 2007 19:15:42 -0000
Author:
|