We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to perform search through the nodes in WinForms MultiColumnTreeView?

Platform: WinForms |
Control: MultiColumnTreeView


In MultiColumnTreeView, we can perform searching through its nodes using the enum “TreeViewSeachOption”.


//Search in MultiColumnTreeView
TreeViewSearchForm searchform;
this.multiColumnTreeView1.SelectionMode = Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeSelectionMode.MultiSelectAll;
searchform = new TreeViewSearchForm(this.multiColumnTreeView1);
private void multiColumnTreeView1_PreviewKeyDown(object sender, PreviewKeyDownEventArgs e)
   if (e.Modifiers == Keys.Control && e.KeyValue == (Char)Keys.F)
     searchform = new TreeViewSearchForm(this.multiColumnTreeView1);
//Search option
TreeViewFindReplaceDialog dialog = null;
dialog = new TreeViewFindReplaceDialog(this.TreeView);
dialog.Find("india", Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewSearchOption.MatchWholeText, TreeViewSearchRange.TreeView);
this.button2.Click += new System.EventHandler(this.button2_Click);
this.button1.Click += new System.EventHandler(this.button1_Click);
private void button1_Click(object sender, EventArgs e)
//Find All
private void button2_Click(object sender, EventArgs e)



'Search in MultiColumnTreeView
Private searchform As TreeViewSearchForm
Me.multiColumnTreeView1.SelectionMode = Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeSelectionMode.MultiSelectAll
searchform = New TreeViewSearchForm(Me.multiColumnTreeView1)
Private Sub multiColumnTreeView1_PreviewKeyDown(ByVal sender As Object, ByVal e As PreviewKeyDownEventArgs) Handles multiColumnTreeView1.PreviewKeyDown
     If e.Modifiers = Keys.Control AndAlso e.KeyValue = CType(Keys.F, Char) Then
        searchform = New TreeViewSearchForm(Me.multiColumnTreeView1)
     End If
 End Sub
'Search option
Private dialog As TreeViewFindReplaceDialog = Nothing
dialog = New TreeViewFindReplaceDialog(Me.TreeView)
dialog.Find("india", Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeViewSearchOption.MatchWholeText, TreeViewSearchRange.TreeView)
 AddHandler button2.Click, AddressOf button2_Click
 AddHandler button1.Click, AddressOf button1_Click
 Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
 End Sub
'Find All
 Private Sub button2_Click(ByVal sender As Object, ByVal e As EventArgs)
 End Sub


Searching for the nodes in MultiColumnTreeView

Fig 1: Searching for the nodes in MultiColumnTreeView


C#: How to perform search through the nodes in MultiColumnTreeView_C#?

VB: How to perform search through the nodes in MultiColumnTreeView_VB?

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile