We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeControlAdv.Nodes.Remove

Essential Suite: 1.6.0.5 It seems that calling TreeControlAdv.Nodes.Remove(node) used to remove the TreeNodeAdv from the tree. Now I have to call node.Parent.Nodes.Remove(node) in order for the node to be removed. Has the behavior of the tree changed or am I suffering an early "senior moment (at 34)"? Thanks, Sean

1 Reply

AS Arun Srinivasan Syncfusion Team October 6, 2003 12:56 PM

Hi Sean, The difference between the two is that the first case will work only if the node is a parent node and it will not work if it is a child node. //Will work only if the node is a parent node this.treeViewAdv1.Nodes.Remove(this.treeViewAdv1.SelectedNode); //Will work irrespective of whether the node is a parent or a child node this.treeViewAdv1.SelectedNode.Parent.Nodes.Remove(this.treeViewAdv1.SelectedNode); So you may not be having a Senior Moment after all Arun

Loader.
Live Chat Icon For mobile
Up arrow icon