$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Windows Forms TreeView Control
Build complex navigation systems and display complex hierarchical structures
Home > WinForms UI Controls > User Manual > Select Nodes in TreeView in C#

Selecting Nodes of KetticTreeView in C#.NET

KetticTreeView control for Windows Forms provides the nodes selecting support and rich API to control the data. The node selecting support allows the users easily to perform the data find operations on the fly when you enable this functionality. This is achieved by using the Selected property of the KetticTreeNode. In the C# tutorial below, we are going through how to select a single node and multiple nodes.

Select a Single Node of KetticTreeView in C#.NET

To perform the node selecting functionality, we shall enable the Selected property of the KetticTreeNode. The simple C# code snippet below shows how to achieve this.

ketticTreeView1.SelectedNode = ketticTreeView1.Nodes[0];

Select Multiple Nodes of KetticTreeView

KetticTreeView control includes the MultiSelect property for the developers to perform the multiple nodes selection. This is achieved via enabling this property to be true. The following description shows the different multiple nodes selection of KetticTreeView in Windows application.
  • Multiple Selection using the Shift key, when the users press the Shift key, they can select the continuous nodes at once.
  • Multiple Selection using the Ctrl key, when the users need to select various nodes which are not continuous, they can press the Ctrl key and use the mouse to click the node they want to select.

C# Select Multiple Nodes of KetticTreeView

KetticTreeView .NET component includes rich C# API for the users to manipulate the control. To select various nodes via the provided C# API, we should enable the Selected property of the nodes that will be selected. And then use the C# code below to perform the selection.

ketticTreeView1.MultiSelect = true;
KetticTreeNode Node1 = new KetticTreeNode("Node A");
KetticTreeNode Node2 = new KetticTreeNode("Node B");
KetticTreeNode Node3 = new KetticTreeNode("Node C");
ketticTreeView1.Nodes.Add(Node1);
ketticTreeView1.Nodes.Add(Node2);
ketticTreeView1.Nodes.Add(Node3);
Node2.Selected = true;
Node3.Selected = true;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls