cancelChanges is reverting even synced records to initial state

3 posts, 0 answers
  1. Dirk
    Dirk avatar
    13 posts
    Member since:
    Jul 2015

    Posted 08 Feb Link to this post

    Hi,

    i created a datasource that's bound to a grid. When i edit a row of a grid and save the changes i do a sync. The update method is called and returned with an code of 200.

    I then try to edit another row, but cancel this changes. In my cancel method of the datasource i call the dataSource.cancelChange() method.

    But now all changes (even the synced ones) are reverted to the initial state ? Why ? What i am doing wrong in this scenario ?

     

    Regards

    Dirk

     

  2. Dirk
    Dirk avatar
    13 posts
    Member since:
    Jul 2015

    Posted 08 Feb in reply to Dirk Link to this post

    Hi,

    sorry for the post - i found the reason why this was happening.

    When i send the data to the update routine on the server  i did not send an id back to the client.

    It would be nice if the documentation could specify, that a sync needs the updated data back to the client.

     

    Dirk

  3. Kendo UI is VS 2017 Ready
  4. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 10 Feb Link to this post

    Hello Dirk,

    We are glad that you have address the issue were facing. Indeed, the update method should return the updated records, this is mentioned in the documentation here.

    Regards,
    Rosen
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top