Cancel Changes Per Row by Using the Incell Editing Mode of the Grid
|Product||Progress Kendo UI Grid|
|Operating System||Windows 10 64bit|
I use a Grid with a remote Datasource with the
batch:true setup. The Grid is in the incell editing mode. The toolbar of the Grid has the
cancel commands. The problem is that the
cancel command discards all made changes.
In other words, I need my Grid to have both of the following commands:
cancel command of the row which discards only the changes of the corresponding row, and
cancel command of the toolbar which discards all changes that are made.
How can I provide a
cancel command per row and at the same time keep the above configurations?
The Kendo UI Grid does not provide a built-in solution for achieving this behavior. However, you can still work around this issue by applying custom logic.
- Add a custom button.
- On the button click, get the item by
cancelChangesonly for that item.
This approach will prevent the item from being updated in the database. However, the old values will be visually reverted after
For more details, refer to the following articles:
To resolve the resulting scroll-related issue, restore the scroll position by using a custom approach. For a demo on how to implement this approach, refer to the modified version of the previously provided example.
Because of the usage of a custom approach, the event is expected to cancel the changes for a specific row. I hope the button click event or another event to be suitable as well for executing the custom logic.