Declined
Last Updated: 30 Nov 2020 14:56 by ADMIN
Brandon
Created on: 22 Jun 2020 21:16
Category: GridView
Type: Feature Request
1
GridView Cell Editor Undo/Cancel on CellEndEdit
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.
1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 23 Jun 2020 05:11
Hello, Brandon,  

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. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

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.