0

Hello

I have a TreeView such as this

1
2
2a
2b
3
4
4a
5

And I want to when I press a button disable 2 and 4 (with all its child nodes). How can I do this?

Thanks

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Luc001
0

Hi,

You can try it this way:

Private Sub TreeView1_AfterCheck(ByVal sender As Object, ByVal e As Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterCheck
 
If TreeView1.Nodes.Item(0).Nodes.Item(0).Checked = False Then
 
TreeView1.Nodes.Item(0).Nodes.Item(0).Checked = True
 
End If
 
End Sub

Edited by Luc001: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.