Within the CellEndEdit event, the GridViewCellEventArgs should contain an item to Cancel/Undo which will revert the value of the cell back to the value it had when CellBeginEdit was called.
Dess | Tech Support Engineer, Principal
Posted on:23 Jun 2020 05:11
The CellEndEdit event is expected to be fired when the editor in the cell is already closed and the edit operation has already finished.
If I understand your requirement correctly, you need to cancel the newly entered value in the editor in certain conditions and revert back the original value. For this purpose, RadGridView provides a convenient way to perform validation before data is committed to the underlying data source. You can validate data by handling CellValidating event which is raised by RadGridView when the current cell changes or when the cell loses input focus (when pressing Enter key). Canceling this event prevents the user from exiting the cell until a valid editor value is entered or the edit process is canceled. It is just necessary to check whether there is an active editor in the grid when the CellValidating gets fired and perform your logic for cancelling the event.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Dess | Tech Support Engineer, Sr.
Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic. Our thoughts here at Progress are with those affected by the outbreak.