2 Treeviews - binding on checkednodes

2 posts, 0 answers
  1. Rhyss
    Rhyss avatar
    60 posts
    Member since:
    Jan 2007

    Posted 08 Nov 2010 Link to this post

    Hi all,
    what i am trying to do is have two treeviews on a page.  one is bound to a datasource with checkboxes.

    What i want to happen is that as a user checks the checkboxes in one treeview, just the checked items appear in the second treeview.

    I tried to bind the second treeview to the RadTreeView1.Checknodes list, but that list does not maintain the different levels of the item.  eg.  a list like
    • A
      • B
      • C
      • D
    • E
      • F

    So if i select A (that is set to select all the children as well) binding to the checkednodes just gives a flat treeview

    • A
    • B
    • C
    • D

    I want to to come out indented as the original.

    Note: if B is selected, A is selected as a partial selection (tristate checkbox) so the full branch should always be selected.


  2. Nikolay Tsenkov
    Nikolay Tsenkov avatar
    734 posts

    Posted 10 Nov 2010 Link to this post

    Hello Jordan,

    Well you need only to check which of the nodes are at the lowest level (on the server the property is node.Level) and add them directly in the Nodes collection of the TreeView (they will persist all the connections with child nodes, the child nodes with their child nodes and so on).

    Hope this is going to help you!

    Nikolay Tsenkov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top