I am adding a child node (Node 1) to a treeview and then I want to add a Child Node (Node 2) to the newly added child node (Node 1):
VB Code:
AddChild(Selectednode, "John Doe", 12) 'Adding Node1 intNodeNum = TreeView1.Nodes(0).Nodes.Count + 1 ' I am attempting to get the ' index of last added node Selectednode = TreeView1.Nodes(0).Nodes(intNodeNum) ' <== I get an error on this line AddChild(Selectednode, "Address", 13) ' <==Node 2
How do I do this?




Reply With Quote