Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm trying to remove a child node from a RadTreeView Parent node. This is working fine as long as it is not the top child node under the Parent.

Parent

>child1

>child2

>child3

>child4

If I remove child2, 3 or 4; it works. But if I remove child1, the Parent is removed along with any remaining child nodes.

The behavior I expected is that I should be able to remove any of the child nodes in any order and the Parent node should be removed only when the last remaining child node is removed - but even that is debatable since what if I wanted to add more child nodes to the Parent node after removing everything?


Thanks for any help.

What I have tried:

Dim remove_node As RadTreeNode = rtvClientSpecs.FindNode(Function(x) x.Value = e.CommandArgument.ToString())
remove_node.ParentNode.Nodes.Remove(remove_node)
Posted
Updated 21-Jun-17 7:15am

1 solution

Nevermind, I figured it out, thanks.
I wasn't properly aggregating the node.fullpath as I was building the class collection to populate the treeview.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900