Completed
Last Updated: 12 Mar 2020 15:16 by ADMIN
Brian
Created on: 17 Apr 2012 15:21
Category: Grid
Type: Feature Request
9
Prevent paging/sorting/filtering when cells have been edited
With a batch edit grid, it would be nice to have the ability to cancel a data operation if cells have been edited.  Currently if the user edits some cells and then does a filter or paging operation before they save their changes, there is no way to warn them and prevent the operation from taking place.  So they will lose their changes.  Ideally, I'd like to have an event that fires before the read() operation is called on the datasource which would allow the read to be cancelled.
4 comments
ADMIN
Angel Petrov
Posted on: 12 Mar 2020 15:16

Hi,

The requestStart event can be prevented thus allowing developers to implement this scenario. Please check this API article.

Regards,
Angel Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
ADMIN
Telerik Admin
Posted on: 18 Apr 2012 09:02
Actually after consulting with a member of the Kendo UI team it appeared that such an event will not be appropriate as the grid operations are executed via the Kendo UI DataSource. 

What you can do for now is to wire the requestStart event of the DataSource component (currently undocumented) to notify the end user that any edits he made will be lost. Unfortunately there is no mechanism exposed to cancel any grid operation right now, however we will contemplate to allow this for the upcoming Kendo UI release when the requestStart event will be documented, too.

I apologize that my previous suggestion was not accurate.
Brian
Posted on: 17 Apr 2012 17:52
Yes, that sounds perfect!  Maybe with an e.preventDefault argument on it so that processing can be stopped if so desired.
ADMIN
Telerik Admin
Posted on: 17 Apr 2012 17:46
I reckon I understand your idea.

Do you think that a command event exposed through the grid API (where you can somehow determine the command that is about to be fired) can help in this scenario? Thus wiring this event can give you the needed trigger to execute your custom logic.

Let us know.