I'm trying to force the load and expand of a node when using LoadOnDemand. I've seen several examples of this in the forums, but I can't get it to work. This is my code:
The children are being retrieved from the server, but the node is not expanded and the children of the node (which I'm trying to access) are not available in the datasource.
Why is the node not expanding?
Thanks in advance.
var
tv = $(
"#FolderTree"
).data(
'kendoTreeView'
);
var
selectedItem = tv.dataItem(tv.select());
var
selectedDataItem = tv.dataItem(tv.findByUid(selectedItem.uid));
selectedDataItem.loaded(
false
);
selectedDataItem.load();
tv.expand(selectedItem)
The children are being retrieved from the server, but the node is not expanded and the children of the node (which I'm trying to access) are not available in the datasource.
Why is the node not expanding?
Thanks in advance.