What I understand is that the tree data has to ordered before hands in order to show in as a hierarchy. Is that correct? The reason I am asking is because other products can accept unordered data but parent-child ids.
Thanks
1 Answer, 1 is accepted
0
Dimitar
Telerik team
answered on 30 Apr 2020, 03:58 PM
Hello Mark,
The TreeView offers an out-of-the-box solution for local flat data through the kendoTreeViewFlatDataBindingdirective. Here's an example. Note that you need to specify the idField and the parentIdField properties for the directive to know which items are related.
Alternatively, you can filter the items yourself. To do so, you will have to implement the children and hasChildren callbacks of the TreeView. Also, the nodesproperty will have to point to a filtered collection that includes only those data items that should be rendered as root nodes. Here's the article from our docs on data binding and here's an example.
Let me know if further information on the topic is required.
Regards,
Dimitar
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.