TreeView OnDemand issue

8 posts, 0 answers
  1. Oscar
    Oscar avatar
    185 posts
    Member since:
    Oct 2010

    Posted 15 Feb 2012 Link to this post

    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.
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 17 Feb 2012 Link to this post

    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!
  3. Oscar
    Oscar avatar
    185 posts
    Member since:
    Oct 2010

    Posted 17 Feb 2012 Link to this post

    http://jsfiddle.net/jx2Yn/

    It works on Firefox and Chrome.
    Does not work (correctly) on Internet Explorer 9
  4. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 20 Feb 2012 Link to this post

    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!
  5. Thai
    Thai avatar
    9 posts
    Member since:
    Dec 2011

    Posted 08 Mar 2012 Link to this post

    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
  6. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 09 Mar 2012 Link to this post

    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!
  7. Thai
    Thai avatar
    9 posts
    Member since:
    Dec 2011

    Posted 09 Mar 2012 Link to this post

    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
  8. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2527 posts

    Posted 12 Mar 2012 Link to this post

    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!
Back to Top