I am using the DataGridView Control for reading and writing an XML file through XML Serialization.
I have an issue as explained below:
OK, this is UGLY but it works to get the FINAL CHANGES from the grid WITHOUT having to move to another row:
With DataGridView1
.DataSource = Nothing
.DataSource = gridDataTable
Dim changedFoo As DataTable = gridDataTable.GetChanges
End With
However I still like the answer from Amit Karmakar the best. I've added the 'DataGridView1.CurrentCell = Nothing' to the DataGridView1 LostFocus event.