This is a migrated thread and some comments may be shown as answers.

Expand icon disappears since update from v2013.1.319 to v2013.2.716

1 Answer 140 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Hans
Top achievements
Rank 1
Hans asked on 26 Jul 2013, 11:35 AM
In our application we use treeviews on multiple places. We use an array as initial data.
treeview = new kendo.ui.TreeView(element, {
     dataSource: new kendo.data.HierarchicalDataSource({ data: [rootModel] })
});
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?

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 30 Jul 2013, 08:21 AM
Hello Hans,

Normally, when a TreeView item is expanded and child items are loaded, the expand icon is temporarily replaced with a "loading" icon.

http://demos.kendoui.com/web/treeview/remote-data.html

The described situation makes me suspect that the loading icon is not displayed, because the image file is missing (loading.gif, which should be located in the same folder as sprite.gif).

If the problem seems to be different, please provide a runnable demo, which works with an older Kendo UI version, but does not work with the current one, for further inspection.

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
TreeView
Asked by
Hans
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or