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

Read replaces instead of merges

1 Answer 74 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
azbola
Top achievements
Rank 1
azbola asked on 01 Jul 2013, 04:26 PM
Hi all,

I am evaluating Kendo's MVVM features and when trying out the datasource I can't stop it overwriting client data whenever I call .read()
I am trying to poll the server periodically (every 10 seconds for instance) and always get the latest snapshot of data on the server.  Unfortunately what happens at the moment is that if a user has pending edits then these edits are lost and replaced with the data from the server, whereas I would expect it to only update records that have not been marked as dirty.
I cannot use autoSync as I require a save button.

Is there something I am missing here or is this not possible?
Is there some other way of achieving this, otherwise it seems to be impossible to have polling updates from the sever whilst a user is editing the data on the client...

Many thanks,
Dave.

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 03 Jul 2013, 10:47 AM
Hello Azbola,

This is the default behaviour - when read method is called the new data will replace old one. I am afraid that there is no default merge functionality. If you wish you could implement a custom transport method that will merge instead of replacing the data. In the corresponding documentation you will find example which demonstrates the syntax.
The only widget which supports pulling updates is the mobile ListView widget.
I hope the information will help.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
azbola
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or