Home Forums WinForms controls Xceed Grid for WinForms How to cancel a row change Reply To: How to cancel a row change

User (Old forums)
Post count: 23064

You can use the validation feature offered by the grid to do this.  You can do it at the cell or the row level.

For example, at row level, in the EndingEdit event, validate the values in each cell, and if some values do not pass the validation process, set the CancelEventArgs.Cancel to true.  This will raise the validation event, in which you can set the RowValidationErrorEventArgs.CancelEdit to false, which will prevent the row form leaving edition.  If you set it to true, the row will leave the edit mode, but cell values will revert back to what they were before editing.

Here is more information from our help documentation :


Imported from legacy forums. Posted by André (had 966 views)