How To Remove The Selected Node From A TreeView In Visual Basic .Net
In this VB.NET Tutorial we will see How To Get The Selected Node From The TreeView Using SelectedNode And Remove It On Button Click Event Using Visual Basic.Net Programming Language And Visual Studio Editor.
Project Source Code:
Public Class Remove_Node_From_TreeView
Private Sub ButtonDelete_Click(sender As Object, e As EventArgs) Handles ButtonDelete.Click
' if a node is selected
If Not (TreeView1.SelectedNode Is Nothing) Then
TreeView1.SelectedNode.Remove()
End If
End Sub
End Class
OutPut:
Download Projects Source Code