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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Thread ID:





45964 Jul 3,2006 06:56 AM UTC Jul 17,2006 08:13 PM UTC WinForms 4
Tags: Tools
Asked On July 3, 2006 06:56 AM UTC

hi Iam having treeview with several nodes in it.Iam doing some Search in this .if I want to search a particular node ,I''ll write in text box & click on the button.This will search tht particular node.But this will expand full nodes.Now my requirement is it should do search without visual expansion and stepping through branches and should only expand the active branch wherein the fragment is found. Also – when finding the next one, the previous should be collapsed if the next occurance is in a new branch (and the new one expanded). Can any one help this

Murugan [Syncfusion]
Replied On July 3, 2006 07:57 PM UTC

Hi, This problem could be solved by using recursive function to find out the required node. After getting the resultant node use TreeviewAdv.CollapseAll() method to collapse tree structure.Then make the resultant node as selected node by assigning treeViewAdv.SelectedNode = node. public TreeNodeAdv FindNodeByText(Syncfusion.Windows.Forms.Tools.TreeNodeAdv node , string text) { if (node != null) { if (node.Text.ToUpper() == text.ToUpper()) { return node; } else { node = FindNodeByText(GetNextNode(node), text); } } return node; } The attached sample demonstrates this method.Please go through that and let me know,if you need more assistance. Thanks for your interest on Syncfusion products. Regards, Murugan PS


Replied On July 6, 2006 06:43 AM UTC


Replied On July 14, 2006 04:47 AM UTC

In this sample,how will i search for the text in treeview,if iam using wildcard charcters. ForExa: If I want to search for murugan ,I''ll enter *rugan or mur* or *ru* .How i''ll do this type of search???

Murugan [Syncfusion]
Replied On July 17, 2006 08:13 PM UTC

Hi Prethi, I have modified the sample based on your searching patterns. I have attached a sample for your reference. Please go through that and let me know if you need more assistance. Regards, Murugan P.S TreeViewSearch.zip


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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