Detecting pending changes, or "dirty cells"

2 posts, 0 answers
  1. MikeWiese
    MikeWiese avatar
    41 posts
    Member since:
    Apr 2007

    Posted 19 Sep Link to this post

    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

  2. Stefan
    Admin
    Stefan avatar
    272 posts

    Posted 21 Sep Link to this post

    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.
     
  3. Kendo UI is VS 2017 Ready
Back to Top