I am attempting to validate some data in a cell before the datasource of the grid gets modified.
Which event would allow me to inspect this cell after the user has left the cell, but before the datasource is modified?
1 Answer, 1 is accepted
answered on 10 Dec 2014, 09:45 AM
Depending on the EditMode that you have set for RadGrid you could use different approaches.
In case you have Batch Editing enabled you should validate the input client-side. To validate the value in a cell you can use the OnBatchEditClosing client event of RadGrid. In case the value is invalid you can prevent the edited cell from closing and prompt the user. If you would like additional information on Batch Editing you would fine the following article interesting:
If you are using another editing mode you can perform server-side validation. You can use the OnUpdateCommand handler to validate the user input. Check out the article below that describes how you can validate the data in RadGrid.