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

reusing treenodes in multiple treeviews

3 Answers 71 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Gerbrand
Top achievements
Rank 1
Gerbrand asked on 04 Jan 2008, 04:20 PM
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

3 Answers, 1 is accepted

Sort by
0
Alex Peachey
Top achievements
Rank 1
answered on 04 Jan 2008, 08:37 PM
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.
0
Gerbrand
Top achievements
Rank 1
answered on 05 Jan 2008, 10:19 AM
Thanks Alex
This helped a lot... now i can add for each treeview different filter options.

0
Jordan
Telerik team
answered on 07 Jan 2008, 04:57 PM
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,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Treeview
Asked by
Gerbrand
Top achievements
Rank 1
Answers by
Alex Peachey
Top achievements
Rank 1
Gerbrand
Top achievements
Rank 1
Jordan
Telerik team
Share this question
or