Partial Display of RadTreeList

1 Answer 26 Views
TreeList
Geof
Top achievements
Rank 1
Geof asked on 02 Jun 2022, 12:41 PM
I have a RadTreeList that is bound to a very large amount of data (100,000 + rows of data). The user is searching and is only interested in only part of the data, perhaps 20-30 rows anywhere in the data bound to the control. These rows will most likely be between child/parents within the treelist and wont have a nice parent/child relationship to display properly. What I want is to only be able to display a partial view of the data around what the user searched on and have the data look like a "snapshot" of the entire treelist. Has anyone done anything like this or are there any suggestions? Any help is appreciated.

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 07 Jun 2022, 09:36 AM

Hello Geof,

The TreeList requires a strict parent/child relationship, so showing just a filtered portion would require some data manipulation after the filtering. 

One option to achieve this would be to obtain the filtered data, then, for each of the nodes to check if their parent is within the filtered set. If it is not, you change the ParentID to null, so this node becomes a root node.

Another option is to obtain the filtered nodes and then recursively get their parents until you reach the root parent. 

Regards,
Peter Milchev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
TreeList
Asked by
Geof
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or