Search code examples
kendo-uikendo-treeview

Updating local data in treeview datasource with load on demand


I'm having a tree with a lot of data (many 1000 entries). That's why I use "loadOnDemand" to prevent rendering issues. The data are loaded at once and given to the tree as an array (local datasource).

Now I have the problem that it can happen that some properties of a node have to be changed. And it can be that this node was not expanded before. Because of "loadOnDemand", it can be that the not expanded subnodes are not loaded to the datasource, so I can not change the "observable" object in the datasource.

Is there a way to update the items of a given array in case they are missing in the datasource? Somewhere the datasource must store the items that are used to generate the "observable" objects for the datasource...


Solution

  • Decided to do it the complexe way: I'm using the transport mechanism to access the local datastorage (array). So I can update the already converted objects in the datasource and also objects in the array before they are converted. There are examples for doing this in the Kendo UI documentation. But if someone need sample Code please tell me.