Hi,
In my application I don't need to use all the fancy features of DataSource. So I thought to use an array of kendo.data.Model objects inside the ViewModel.
There is a property called "dirty" and another called "isNew()".
If I want to get all new objects added on client, then I can filter based on isNew = true. To get all those items that need to be updated on server, then I look at "dirty = true".
Is the above correct? Is there another way (could be better) to get list of items to be deleted, updated, created on server?
One more thing, I noticed that if I update a newly added item on client-side, its dirty becomes true and isNew is false. Is that the normal behavior?
Finally, is there a way to use DataSource as a local database on client side to track updated, created, and deleted records, however, having it based on "data" property, i.e. without any remote transport stuff? Then, I could use DataSource as a local storage to track all changes, then I can filter out rows to be deleted, created and updated on server.
Thanks
In my application I don't need to use all the fancy features of DataSource. So I thought to use an array of kendo.data.Model objects inside the ViewModel.
There is a property called "dirty" and another called "isNew()".
If I want to get all new objects added on client, then I can filter based on isNew = true. To get all those items that need to be updated on server, then I look at "dirty = true".
Is the above correct? Is there another way (could be better) to get list of items to be deleted, updated, created on server?
One more thing, I noticed that if I update a newly added item on client-side, its dirty becomes true and isNew is false. Is that the normal behavior?
Finally, is there a way to use DataSource as a local database on client side to track updated, created, and deleted records, however, having it based on "data" property, i.e. without any remote transport stuff? Then, I could use DataSource as a local storage to track all changes, then I can filter out rows to be deleted, created and updated on server.
Thanks