I want to have a SaveChanges routine called when the user clicks either a Close button or the form’s close (X in top right corner). The following code works for rows that are being edited when it is called, but if the user is in the Insertion Row, it generates an error 13 “Cannot cast insertion row to data row”.
Dim dr As Xceed.Grid.DataRow
dr = GridControl1.CurrentRow dr.EndEdit() da.Update(ds)
How do I test for the insertion row, and what code will then commit that to a data row?
Imported from legacy forums. Posted by Phil (had 2815 views)