We are trying to port a Telerik MVC tree to a Kendo UI treeview. Most of the things works great using the hierarchical datasource, but there is one thing I'm missing in the new Kendo UI controls; the loadondemand option on the node itself.
In the old MVC controls I could indicate on each node if it had children AND if it needed a load on demand. I needed this because my tree is based on some filters and settings, so the layering can differ each time. Some of the database queries I can do more easily by retrieving two or three levels at the same time.
So for example I can load the following construct:
A
- B
- - C
With the MVC Control for both A, B and C I could indicate that they have children, but only C need to invoke another request, so it had the loadondemand value on true.
With the Kendo UI treeview, I'm unable to specify per node the loadondemand option. So I can return level A but then I need to indicate they have children (otherwise the expand icon is not shown) and the child items are not rendered. If you click the expand arrow, it will however not use the items collections, but will invoke a new request to load the next level. Not needed because that level is already loaded. In the MVC controls I could indicate this, but in Kendo UI there is no option for this. I tried to set the children property in the schema, but I'm unable to set it as a function (for example; if item has items, use it, otherwise use the datasource itself to load new level).
So is it somehow possible to use both a node with child items and a node that needs on demand loading?
In the old MVC controls I could indicate on each node if it had children AND if it needed a load on demand. I needed this because my tree is based on some filters and settings, so the layering can differ each time. Some of the database queries I can do more easily by retrieving two or three levels at the same time.
So for example I can load the following construct:
A
- B
- - C
With the MVC Control for both A, B and C I could indicate that they have children, but only C need to invoke another request, so it had the loadondemand value on true.
With the Kendo UI treeview, I'm unable to specify per node the loadondemand option. So I can return level A but then I need to indicate they have children (otherwise the expand icon is not shown) and the child items are not rendered. If you click the expand arrow, it will however not use the items collections, but will invoke a new request to load the next level. Not needed because that level is already loaded. In the MVC controls I could indicate this, but in Kendo UI there is no option for this. I tried to set the children property in the schema, but I'm unable to set it as a function (for example; if item has items, use it, otherwise use the datasource itself to load new level).
So is it somehow possible to use both a node with child items and a node that needs on demand loading?