I have a VisualStudio generated DataSet.
I connected them into a DataGridView (width connected by VisualStudio).
I’m using a filter. For example:
xyBindingSource.Filter = "yx = 'tart'";
My problem:
If I change any value of yx column (from tart to anything else), the changed row will remove before a CellEndEdit event going to run.
And in a CellEndEdit event, the DataGridViewCellEventArgs will contains the correct row and column number.
But the row what is pointed by the event args is not that, what is edited, because the selected row is removed earlier.
What can I do?
Thanks for help:
Norbi
You can handle this by using the
DataGridView.CurrentCellDirtyStateChangedEvent. This can raise theDataGridView.CellValueChangedEvent, if you do it like this:CommitEditmanually raises theDataGridView.CellValueChangedEvent. You can reload yourFilterMethod inside this Event again. Give it a try.