Force a cell to get out of edit mode when user selects a button

Hello,

I have this occurring:

The user edits the contents of a cell and then pushes a button which goes to the next part of a wizard form. The last edited cell is not properly saved since it was still in edit mode. How can you force it to be saved?


1 Reply

NR Nirmal Raja Syncfusion Team December 2, 2010 12:37 PM UTC

Hi David,

Please try to call EndEdit method which will update the finally edited cell, and does not moves away from the cell.

If you use GridControl, then you can directly call the EndEdit for the CurrentCell. If you use the GridDataBoundGrid, the EndEdit will be effective only when you use it to the Binder object. And for the GridGroupingControl please make use of the Table object to update the cell.

Please refer the code below:
//GridControl
gridControl1.CurrentCell.EndEdit();

//GridDataBoundGrid
gridDataBoundGrid1.Binder.EndEdit();

//GridGroupingControl
gridGroupingControl1.Table.EndEdit();


Let me know if you have any queries.

Regards,
Nirmal


Loader.
Up arrow icon