My question is similar to below, except that i dont know whats the alternative.
When user finishes editing, the datagridview should refresh and display only those records which satisfy the gird's dataview criteria. so at the end of EndEdit i call doubleClick event of a control which populates the grid again according to the criteria. this approach works fine as long as the edit is complete. but if the user is still in edit mode & any other cell of the same datagridview is clicked i get this exception.
Operation is not valid because it results in a reentrant call to the SetCurrentCellAddressCore function.
every other control is good because grid is out of edit mode. I have tried:
datagridview.CancelEdit();
before assigning the datasource to the grid again, but it gives the same exception.