How to clear selection of selected node in TreeView?

How to deselect a selected node (after selecting an event)?

+4
source share
1 answer

When you encounter such problems (dealing with what you need to use), you should contact MSDN and then find out.

Now see the TreeView page in msdn. It has a Selectednode property that says:

If no TreeNode is selected, the SelectedNode property is null.

In addition, he has a getter and setter. So my best bet is:

myTreeView.SelectedNode = null;//will deselect it 
+14
source

All Articles