reusing treenodes in multiple treeviews

4 posts, 0 answers
  1. Gerbrand
    Gerbrand avatar
    5 posts
    Member since:
    Dec 2007

    Posted 04 Jan 2008 Link to this post

    How do i solve this...
    I have 5 treeviews on different contentpanels that can be viewed by the related tab.
    I'm adding on the 5 trees the same structure of nodes. It is no problem to add the nodes to one treeview, but if i add the same
    nodes to another treeview they disappear out of the original one and is set to the next one. Any solution for this matter? Searched the net but didn't found anything.

    thanks in advanced
  2. Alex Peachey
    Alex Peachey avatar
    56 posts
    Member since:
    May 2006

    Posted 04 Jan 2008 Link to this post

    As far as I know a node can only belong to one treeview at a time. If the node has the same content, style, text, etc as another node and the only difference is you want it to appear in a second treeview what you need to do is clone the original node.
    So after creating your node, clone it as many times as you need (it sounds like maybe 5) and then add each node to the respective treeview.

    Someone from Telerik might have a better answer but that might help until they get to this message.
  3. DevCraft R3 2016 release webinar banner
  4. Gerbrand
    Gerbrand avatar
    5 posts
    Member since:
    Dec 2007

    Posted 05 Jan 2008 Link to this post

    Thanks Alex
    This helped a lot... now i can add for each treeview different filter options.

  5. Jordan
    Jordan avatar
    547 posts

    Posted 07 Jan 2008 Link to this post

    Hi Gerbrand,

    Alex is correct. If a node that belongs to a RadTreeView is added to another RadTreeView it is automatically removed form the first. Therefore, if you want to have the same node appear in another RadTreeView you must clone it first.

    If you have any additional questions, please contact us.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top