Home Forums WinForms controls Xceed Grid for WinForms Save Current Row Data when Exiting Grid 3.0

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14255 |

    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)

    User (Old forums)
    Member
    Post count: 23064

    The format is as follows

    ( ( Xceed.Grid.CellRow )gridControl1.CurrentRow ).EndEdit();

    Imported from legacy forums. Posted by dcemanuel (had 2826 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.