Hi Telerik, we use the kendo treeview and we need to load-on-demand subitems.
We have some issues.
1. When the treeview have lots of subitems, it generates too many "databind" when we expand it, if loadOnDemand = false.
But, that way, we are able to load our subitems correctly.
2. So, we prefer to use loadOnDemand = false, that generates only 2 databind, 1 when we expand, and 1 other when we set the data.
But, we're unable to set the data, if we don't add a "setTimeout", because the data item is incomplete! It looks like the "expand" event is raising too quickly, .items list doesn't contains our "loading..." item, and if I set new data to it, nothing happen.
If I add a setTimeout,the argument is ok and I can load my subitems.
So, my suggetsions are:
1. do not generate too many databind event if loadOnDemand = false?
2. can you raise the "expand" event when the data is really ready to be used?
Or, is there something we're doing wrong? We can continue using the settimeout, in fact,it works in our case because we do an "ajax" call. But, if my data is in "cache" and I don't need ajax call, I must do a setTimeout.
Sample:
https://dojo.telerik.com/isuGOn/134
Thank you