Trying to delete the selected node by calling: this.treeViewAdv1.Nodes.Remove(this.treeViewAdv1.SelectedNode); The above code will only delete the selected node if it is a root node. This is because TreeViewAdv.Nodes collection does not contain all the nodes of the tree, just thelevel 0 nodes. If the node is in a level greater than 0, it is not deleted as it is not contained in the primary Nodes collection. So you instead should call: C# TreeViewAdv.SelectedNode.Parent.Nodes.Remove(TreeViewAdv.SelectedNode); VB TreeViewAdv.SelectedNode.Parent.Nodes.Remove(TreeViewAdv.SelectedNode) |
Article ID: | Published Date: | Last Revised Date: | Platform: | Control: |
1235 | 04/30/2011 | 07/10/2014 | WinForms | TreeViewAdv |
Tags:
|
|
or the page will be automatically redirected to sign-in page in 10 seconds.