We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

GridDataBoundGrid end cell edit

I have the following situation:
- Form1 and Form2 (Form1 is the owner of Form2)
- Form2 has on it a GridDataBoundGrid
- edit a new cell in the grid (don't click on another cell)
- click on Form1 => Form2 is still on the screen (because Form1 is set to be its owner), but the grid is still in edit for the cell (there is a pencil drawn next to that row) - see edit.jpg

I want that the cell terminates with editing when Form1 is clicked. How can I do that?

Thanks.
Adriana

edit0.zip

1 Reply

AD Administrator Syncfusion Team January 29, 2007 05:24 PM UTC

Hi Adriana,

If you want to remove the pencil mark in row header of the grid then you should call the Binder.EndEdit method followed by the CurrentCell.EndEdit method in Form2.Deactive event. Here is a code snippet to show this.

private void Form2_Deactivate(object sender, System.EventArgs e)
{
grid.CurrentCell.EndEdit();//saves the currentcell
grid.Binder.EndEdit(); //removes the pencil
}

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon