Category / Section
How to commit the unsaved changes of editing cell when the grid loses its focus?
1 min read
In GridControl, when the grid loses its focus while editing, you can save the changes in the cell by invoking LostFocus event of GridControl and calling the EndEdit() method of GridCurrentCell to commit the edited value into a cell.
C#
grid.LostFocus += grid_LostFocus void grid_LostFocus(object sender, RoutedEventArgs e) { if (e.Source != this.grid) { if (grid.CurrentCell.IsEditing) { grid.CurrentCell.EndEdit(); } } }
Please find the sample link for your reference,