Articles in this section
Category / Section

How to change the selection mode in the WinForms TreeViewAdv dynamically?

1 min read

Seletion mode

TreeViewAdv has a property named as SelectionMode which accepts the members of the TreeSelectionMode enumerator.  TreeSelectionMode Enumerator contains the three different modes to select the nodes - Single, MultiSelectSameLevel and MultiSelectAll.

C#

//Lets you select one node at a time.
this.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.Single;
//Lets you select multiple nodes within the same level.
this.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.MultiSelectSameLevel;
//Lets you select multiple nodes across all levels.
this.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.MultiSelectAll;

VB

'Lets you select one node at a time.
Me.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.Single;
'Lets you select multiple nodes within the same level.
Me.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.MultiSelectSameLevel;
'Lets you select multiple nodes across all levels.
Me.treeViewAdv1.SelectionMode=Syncfusion.Windows.Forms.Tools.TreeSlectionMode.MultiSelectAll;

Reference link: https://help.syncfusion.com/windowsforms/treeview/treenodeadvcustomization#nodeselection

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied