In our application we use treeviews on multiple places. We use an array as initial data.
Rather then using the transport / read and schema functionality we hook to the expand event and do our own async (ajax) requests. This was all fine in v2013.1.319 but since we updated to v2013.2.716 what happens is the following.
- The initial data is represented in the tree view, including expand icons when the node has children available.
- We click an expand icon to load new data
- A ajax request is sent to our back-end
- The expand icon disappears completely
- Ajax request completes
- Current children are removed and the loaded children are inserted into the loaded node.
- The collapse icon appears
This only happens the first time a node is expanded. When expanding a node that was expanded before the icon does not disappears.
Is this by design? Can we somehow prevent the expand icon from disappear?.
On a side note: Is it possible to set a loading icon programmatically (similar to the "Binding to remote data" demo) during the ajax request?
treeview = new kendo.ui.TreeView(element, {
dataSource: new kendo.data.HierarchicalDataSource({ data: [rootModel] })
});
- The initial data is represented in the tree view, including expand icons when the node has children available.
- We click an expand icon to load new data
- A ajax request is sent to our back-end
- The expand icon disappears completely
- Ajax request completes
- Current children are removed and the loaded children are inserted into the loaded node.
- The collapse icon appears
This only happens the first time a node is expanded. When expanding a node that was expanded before the icon does not disappears.
Is this by design? Can we somehow prevent the expand icon from disappear?.
On a side note: Is it possible to set a loading icon programmatically (similar to the "Binding to remote data" demo) during the ajax request?