By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,942 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

TreeView node insertion in between existing nodes

P: n/a
I've got a treeview created by

TreeNode node = treeView1.Nodes.Add("one");
node.Nodes.Add("three");

looks like:

one
-three

How do I insert "two" between one and three (one becomes the parent of
two, which becomes the parent of three, and the parent-child
relationship between one and three is broken).

one
-two
-three
thanks.

Feb 17 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sat, 17 Feb 2007 09:49:34 +0800, <fi******@comcast.netwrote:
[...]
How do I insert "two" between one and three (one becomes the parent of
two, which becomes the parent of three, and the parent-child
relationship between one and three is broken).
Remove "three" from the nodes of "one", add it to the nodes of "two" and
add "two" to the nodes of "one".
Feb 27 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.