This is a migrated thread and some comments may be shown as answers.
Detecting pending changes, or "dirty cells"
1 Answer 67 Views
This is a migrated thread and some comments may be shown as answers.
MikeWiese
Top achievements
Rank 1
MikeWiese asked on 20 Sep 2016, 02:49 AM

We display a kendo spreadsheet in a modal kendo window.  A common usage pattern among our users is to make changes to a cell, then click an OK button to close the window.  Their expectation is that their changes will be saved. But of course they are not, because they are still "pending changes". For example, the user edits are not serialised in the toJSON() method.

Is is possible to expose a property or method that would allow developers to detect and commit such pending changes? Some of us may simply want to detect pending changes, so that we can create our own logic to prompt the user to commit or roll back the pending change

 

Regards,

Mike Wiese

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 21 Sep 2016, 02:20 PM
Hello Mike,

I can suggest using the hasChanges method of the Spreadsheets dataSource instance. This will check if changes are made, which are not synced (sent to the server but the response is not received):

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-hasChanges

This can be used to check if the changes are made and if not to prevent the window from closing and then manually closing it when the changes are saved:

http://docs.telerik.com/kendo-ui/api/javascript/ui/window#events-close

http://docs.telerik.com/kendo-ui/api/javascript/ui/window#methods-close

I hope this will help you to achieve the desired result.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Asked by
MikeWiese
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or