I have a TreeView control in VS 2010 that I need to be able to INSERT (not add) nodes to. I have stored a unique key in the TAG for each node and know how to find the value of the tag in the tree. However, I can't figure out how to INSERT a NEW node BEFORE or AFTER the node I have found with this tag.
For example, suppose I have the following tree . . .
Item 1
... Item 2
... Item 3
... Item 4
......Item 5
......Item 6
......Item 7
... Item 8
... Item 9
Item 10
The TAG for our example is simply the 1,2,3,4 etc.
If I wanted to INSERT a NEW node at the same level as Item 6 (not a CHILD NODE) but AFTER Item 6 the Tree should look like . . .
Item 1
... Item 2
... Item 3
... Item 4
......Item 5
......Item 6
......Item 6.1
......Item 7
... Item 8
... Item 9
Item 10
I need to be able to do this for any particlular level of the tree (not just the third level where Item 6 is located). Also, Item 6 could have CHILD NODES associated with it but I need to leave those child nodes assoicated with Item 6 and INSERT Item 6.1 below (or above) Item 6 at the same level as Item 6.
Any help someon can pass along would be greatly appreciated.
Thanks