TreeView - expand all node subitems structure on demand

2 posts, 0 answers
  1. Elko
    Elko avatar
    23 posts
    Member since:
    Dec 2012

    Posted 16 Oct 2014 Link to this post

    Hello,

    we are using treeview, loading nodes on demand having checkboxes (.Checkboxes(cb => cb.CheckChildren(true)).  The tree has 500-1000 nodes.

    One requirement is,  if a user changes a checkbox, the checkbox state must be set to all the children of this node.

    My questions are

    - has TreeView such functionality built in ?
    - Is it possible to expand all sub nodes (complete structure) of  a given node when loaded on demand ?


    Many thanks in advance.

    Regards
    Thomas
  2. Alex Gyoshev
    Admin
    Alex Gyoshev avatar
    2500 posts

    Posted 17 Oct 2014 Link to this post

    Hello Thomas,

    > if a user changes a checkbox, the checkbox state must be set to all the children of this node. 
    This is what the CheckChildren functionality does. Note that checked state of items that are not loaded is not set, because the items are not available on the client side.

    > Is it possible to expand all sub nodes (complete structure) of  a given node when loaded on demand? 
    Yes, and this will solve the problem with the not-yet-loaded items above. See the linked Dojo snippet on how to load all subnodes on item check.

    Regards,
    Alex Gyoshev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
Back to Top