Search

.NET TreeView - Add Child Node to existing Parent Node by specifying Parent name

.NET TreeView - Add Child Node to existing Parent Node by specifying Parent name

Dim xMyTVNode As TreeNode()
Dim NewTVNode As TreeNode = New TreeNode("keyhere") With {.Name = "Name here", .SelectedImageIndex = 0, .ImageIndex = 0}
xMyTVNode = mytv.Nodes.Find("Parent Name here", True)
xMyTVNode(0).Nodes.Add(NewTVNode)

No comments:

Post a Comment

Note: only a member of this blog may post a comment.