I tryied to implement a recursive search in a tree without success.
For example my tree display 3 levels: root, parents and children. I need to return as result a new tree with only the children (and parets of course) that have specific string in their names.
for example:
Company
DEV
Yoni
Cris
Mark
QA
Yossi
Alex
Serah
Danna
QM
Josef
If I search for "yo"
The new tree should return:
Company
DEV
Yoni
QA
Yossi
Can anyone help me with this problem?
Mahesh ChandPosted Feb 18, 2009, 7:43 PM
If you have a data source bound to the TreeView control, you can use the data source to find the matching items and probably create another data source with matching items and rebind your TreeView with this new data source.
Alternatively, if your tree does not have lot of items (less than 100 is OK), loop through TreeView items and delete items that does not match with the keyword.