Posts: 96
Threads: 39
Joined: Sep 2011
Reputation:
0
Hi all
I have a question about the TreeView. How can I declare if nothing is selected in the TreeView.
Thanks in advance
Posts: 1,006
Threads: 111
Joined: Jul 2010
Reputation:
1
Do you want to clear the current selection? Or check to see if the user is currently selecting something?
Posts: 96
Threads: 39
Joined: Sep 2011
Reputation:
0
The second one. I want to know if the user selected something.
Posts: 1,006
Threads: 111
Joined: Jul 2010
Reputation:
1
If you are using .NET 3.0 or above, the following code will work to see if the user is selecting something.
[code2=vbnet]If Not (TreeView1.SelectedItem Is Nothing) Then
MsgBox("The User is not selecting anything!")
End If[/code2]