I'm trying to remove a child 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?
Here is my code:
Dim
remove_node
As
RadTreeNode = rtvClientSpecs.FindNode(
Function
(x) x.Value = e.CommandArgument.ToString()) remove_node.ParentNode.Nodes.Remove(remove_node)