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

TreeView OnDemand issue

7 Answers 202 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Oscar
Top achievements
Rank 1
Oscar asked on 15 Feb 2012, 06:05 PM
I have somehow managed to make a load on demand treeview with kendo.
However I have found an issue while I was developing it. I'm making use of the function append (which calls to _insertNode), in this function (_insertNode) you are setting by default "expanded: true" to the groupData.
This works ok (though we do not need the node to be expanded if we're trying to load on demand) in firefox and chrome, however in IE9 after collapsing and expanding a second depth level (though to other people may happen on any other level) the child items are shown behind the other n-1 level items, using css language:

n-1 level items -> z-index: 999 (not real just to let you understand it)
n level item -> z-index: 1

Setting it to false "expanded: false" fixes it anyway.

7 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 17 Feb 2012, 01:01 PM
Hello Oscar,

Can you provide a more specific example, preferably a jsfiddle that demonstrates the issue? In order to simplify it (and not have to mock AJAX requests), you could just bind to the specific static data that shows the problem.

Kind regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Oscar
Top achievements
Rank 1
answered on 17 Feb 2012, 06:02 PM
http://jsfiddle.net/jx2Yn/

It works on Firefox and Chrome.
Does not work (correctly) on Internet Explorer 9
0
Alex Gyoshev
Telerik team
answered on 20 Feb 2012, 10:26 AM
Hello Oscar,

This issue has been fixed in the service pack and the latest internal builds. The problem was that after animation, the sub-groups got an incorrect "height" property that did not work well with the append() calls. You can either upgrade (recommended) or set animation: false to disable the animations and prevent the problem.

Kind regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Thai
Top achievements
Rank 1
answered on 08 Mar 2012, 08:41 AM
Hi Alex,

Does treeview have event like animaionEnd? I need to get new height of treeview after user expands or collapse its items.
Because in the expand/collapse event of treeview, the sub-items have not get expanded/collapsed yet. Until the event is finished, treeview will have new height.

Thanks,
Thai
0
Alex Gyoshev
Telerik team
answered on 09 Mar 2012, 09:53 AM
Hello Thai,

The treeview does not have such an event at this moment. A possible workaround is to use setTimeout with the duration of the animation, and execute your code afterwards. What use case do you have for such an event?

All the best,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Thai
Top achievements
Rank 1
answered on 09 Mar 2012, 12:25 PM
Hi Alex,

I am using TreeView inside a Splitter. I want to get the height of treeview after it is expanded or collapsed to reset height of the splitter.
The expand, collapse events of treeview are occurred before sub-nodes are expanded/collapsed. So I think there should be events like endExpand, endCollapse, endAnimation...

Thanks,
Thai
0
Alex Gyoshev
Telerik team
answered on 12 Mar 2012, 01:07 PM
Hello Thai,

Even if we introduce these events, the adjustment of the splitter height will be "jumpy" -- i.e. the splitter height will not be adjusted until the animation finishes. It seems that you are trying to implement some way of auto-sizing the splitter, which is currently unsupported. You can use a setTimeout as a work-around, or disable the TreeView animation.

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