TreeView Angular Expand All

1 Answer 124 Views
TreeView
Bao
Top achievements
Rank 1
Bao asked on 01 Dec 2021, 05:23 AM

I have a button expand all, and i want to click this button - treeview expand all nodes. How i can do it ?

Thanks.

1 Answer, 1 is accepted

Sort by
0
Accepted
Yanmario
Telerik team
answered on 03 Dec 2021, 10:46 AM

Hi Bao,

The most straightforward approach to achieve the desired functionality is to handle expandedKeys and expandBy properties. Example demonstrating such an approach:

https://stackblitz.com/edit/treeview-expand-all-collapse-all?file=app/app.component.ts

Further modifications might be required depending on the use case scenario.

I hope this helps.

Regards,
Yanmario
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
TreeView
Asked by
Bao
Top achievements
Rank 1
Answers by
Yanmario
Telerik team
Share this question
or