DataGridView save changes only when a cell looses focus or new row is selected. Users can forget to do so specially on the last row in a grid. How to commit changes so to be available into ds.GetChanges(DataRowState.Modified) when pressing a "save" button or exit program?
2
votes
1 Answers
2
votes
You could use the EndEdit method, which commits and ends the edit operation on the current cell.
myDataGridView.EndEdit()
See more details on MSDN.