[2005] Add child node in TreeView using the key;
I have one key of a node in a TreeView.
How can I add a new child node under the node that it has this key?
For example,
Code:
Dim tv As New TreeView
tv.Nodes.Add("Key1", "Text1")
tv.Nodes.Add("Key2", "Text2")
tv.Nodes.Add("Key3", "Text3")
To add some node undet the Key2 I have to write this.
Code:
tv.Nodes("Key2").Nodes.Add("Key2_1", "Text2_1")
tv.Nodes("Key2").Nodes.Add("Key2_2", "Text2_2")
But If I don't know the exactly level structure, how can I add a child node by knowing only the Parent Key.
Re: [2005] Add child node in TreeView using the key;
Look at the Find method in the Nodes property of the treeview.
Re: [2005] Add child node in TreeView using the key;