This is a migrated thread and some comments may be shown as answers.

Search / expand

2 Answers 52 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Peter
Top achievements
Rank 1
Peter asked on 24 Apr 2020, 12:30 PM

Hi

I am trying to make a search function in a treeview.

Using this code will find what i am looking for:

 

       Dim result As RadTreeNode() = RadTreeView1.FindNodes("Anders And")

        result(0).RootNode.ExpandAll()
        result(0).Selected = True

but all nodes are expanded, like 'expand1.png'

I would like it to look like 'expand2.png'

Kindly Peter

 

 

2 Answers, 1 is accepted

Sort by
0
Peter
Top achievements
Rank 1
answered on 26 Apr 2020, 08:28 AM

Never mind, i figured it out my self :-)

 

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Apr 2020, 12:25 PM

Hi, Peter,

I am glad that you have found a suitable solution for your case.

However, I would like to give some explanation in order the community to benefit from it.

The ExpandAll method is expected to expand all nodes in RadTreeView. If you need to expand certain nodes only, feel free to use the RadTreeNode.Expanded state. Thus, you can control the specific nodes that should be expanded.

If you need any further assistance please don't hesitate to contact me. 

Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
Treeview
Asked by
Peter
Top achievements
Rank 1
Answers by
Peter
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or