This is a migrated thread and some comments may be shown as answers.

Prevent paging/sorting/filtering when cells have been edited

2 Answers 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Brian Roth
Top achievements
Rank 1
Brian Roth asked on 12 Apr 2012, 10:01 PM
With a batch edit grid, I wanted to write a method that would warn the user if they try to do a page/sort/filter operation when they have data that hasn't been saved.  I figure I can look for any cases where .k-dirty-cell shows up and if any are found I can launch a confirm dialog that asks "Save changes before continuing?" or something like that.  But what I can't figure out is what event on the grid or datasource I would need to hook into for this logic.  Ideally, I'd want to have it fire before the read() operation is called on the datasource since that would catch pretty much any situation where the data might get overwritten.  Any suggestions on how/if this can be done?

Thanks!

Regards,
Brian

2 Answers, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 17 Apr 2012, 02:18 PM
Hi Brian,

I am afraid that this scenario is not supported at the moment.
As a general information, I believe that you are looking for the requestStart event of the dataSource, which is triggered before read operation. But even if you hook up to this event, you will not be able to prevent the default dataSource behaviour from there.

Such functionality sounds like a meaningful and useful improvement, so I would like to ask you to submit your idea at our user voice page. Thus way other users would be able to comment and vote for it. If it turns out to be popular we will consider it for one of the future releases.

Regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Brian Roth
Top achievements
Rank 1
answered on 17 Apr 2012, 03:23 PM
Hi Alexander,

Thanks for the reply.  I posed in the User Voice, so we'll see what happens.  I think in the meantime, I'll try hooking in to requestStart to at least pop up a warning message to the user.  Maybe I can even kick off a save in that method to somewhat help with the situation.

Regards,
Brian
Tags
Grid
Asked by
Brian Roth
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Brian Roth
Top achievements
Rank 1
Share this question
or