TreeView add treenode at a specific location

D

d_mike_2004

Hi,
i have been trying to add a treenode into a Treeview.
for example, say i have a tree as beloew:
Node1
Node2
Node3
Node4
Node5
Node6


how would i insert a node between Node2 and node3 ?
I tried to traverse to Node2 and add the newNode as below:
Node2.ChildNodes.Add(newNode)

So wat happen to Node3, or should i attach Node3 to the newNode first,
before add the newNode to node2?
Anyone have any sample code to share?

It should be simple. I have spent alot of time to work this out but
without success.
Thanks,
Mike
 

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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top