I need to save edited data in the current row if the user decides to close the window before changing grid rows. Not sure how to call the EndEdit command. I have tried the following code but it does not work.
private void NewPlate_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//Make sure we save change
try
{
if( ( ( DataRow )gridControl1.CurrentRow ).IsBeingEdited )
( ( DataRow )gridControl1.CurrentRow ).EndEdit();
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
THANKS in advance for help!
Imported from legacy forums. Posted by dcemanuel (had 1909 views)