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

How to copy nodes collection from one tree node to another?

2 Answers 277 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Joe Sixpack
Top achievements
Rank 1
Joe Sixpack asked on 14 Jun 2010, 09:04 PM
This is probably very simple but what is the easiest way to copy a nodes collection from one tree to another or even to another node within the same tree?  Including any sub nodes belonging to the collection.

2 Answers, 1 is accepted

Sort by
0
Joe Sixpack
Top achievements
Rank 1
answered on 15 Jun 2010, 01:55 AM
On a related question, how do I move a node subtree up a number of levels?  For example,

- root node
    - child 1
        - child 2
            - child 3

change to this:

- child 2
    - child 3
0
Nikolay Tsenkov
Telerik team
answered on 18 Jun 2010, 07:30 AM
Hello Joe,

About copying nodes:
- We don't support it implicitly. But you have an option - you can create new nodes and fill them with the data of the ones that are being copied.

About moving nodes:
- You can simply achieve it by adding specific node to the nodes collection of another (or the treeView's one) and you don't need to worry about removing it from the previous one (it's being removed from there automatically).

Hope this is going to help you!


Regards,
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
Tags
TreeView
Asked by
Joe Sixpack
Top achievements
Rank 1
Answers by
Joe Sixpack
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Share this question
or