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

How to tell DataSource that the data was changed outside?

2 Answers 75 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Brett
Top achievements
Rank 1
Brett asked on 03 Jul 2018, 05:37 PM

I have a local data source which is a JS array. I setup transport methods to read/write the data. When the data is modified by Kendo widget like grid it works fine.

If I modify the array directly outside a widget in JS, how can I tell Kendo that the data source changed?

 

Thanks!

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Jul 2018, 05:53 AM
Hello, Brett,

There are different approaches depending on the scenario.

If a single item is added or deleted, the add and remove method can be used:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/add

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/remove

The other option is directly passing the changed data using the data method:

https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/methods/data

I hope this is helpful.

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Brett
Top achievements
Rank 1
answered on 05 Jul 2018, 07:56 AM
Thanks Stefan
Tags
Data Source
Asked by
Brett
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Brett
Top achievements
Rank 1
Share this question
or