Cloning Treenodes

C

Chris

Hi All.

I'm cloning a treenode, like so:

TreeNode trNewTemp = new TreeNode();
trNewTemp = ((((ICloneable)trTempNode).Clone()) as TreeNode);

Now the cloning works- trNewTemp has the same content and properties
as trTempNode. The problem is, the treenode I'm cloning has multiple
childnodes, and childnodes of those childnodes.... it's about 6 deep.
The cloned node only has the root level node, not the childnodes. Is
there a way I can clone the whole treenode, without enumerating all
six levels?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top