ASPForums.Net RSS Feed additions to the content that appears on ASPForums.Net(c) 2019 All rights reserved.Make Windows Form TreeView Node Not Clickable using C# and VB.Net<p>Hi&nbsp;aspvijay04,</p> <p>I am assuming you don't want TreeView node to be selectable.</p> <p>You can do with&nbsp;BeforeSelect event and you can cancel it.</p> <p>For using TreeView in Windows Application refer below article.</p> <h1 class="header"><a title="Populate TreeView from Database in Windows Forms using C# and VB.Net'a" href="">Populate TreeView from Database in Windows Forms using C# and VB.Net</a></h1> <p><strong><span style="text-decoration: underline;">C#</span></strong></p> <pre class="brush: csharp">private void treeView1_BeforeSelect(object sender, TreeViewCancelEventArgs e) { e.Cancel = true; }</pre> <p><strong><span style="text-decoration: underline;">VB.Net</span></strong></p> <pre class="brush: vb">Private Sub treeView1_BeforeSelect(sender As System.Object, e As System.Windows.Forms.TreeViewCancelEventArgs) Handles treeView1.BeforeSelect e.Cancel = True End Sub</pre> <p><strong><span style="text-decoration: underline;">Screenshot</span></strong></p> <p><strong><span style="text-decoration: underline;"><img src="" alt="" width="251" height="291" /></span></strong></p>, 07 Dec 2018 03:04:58 GMT