Home » FAQ » WinForms » TreeView » How do I programmatically select a node in a TreeView control?
You need to set the HideSelection property of the TreeView to false and call:
[C#] //Select the first node this.treeView1.SelectedNode = this.treeView1.Nodes[0]; [VB.NET] ’Select the first node Me.treeView1.SelectedNode = Me.treeView1.Nodes(0)
Platform BlazorASP.NETWinFormsWPF.NET MAUI
Question *
Answer (Optional)
Email (Optional)
Email address is only for further clarification on your FAQ request. It will not be used for any other purpose.
Please leave this field empty.
Share with