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

[Solved] Check+Expand / Uncheck+Collapse all nodes

1 Answer 170 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
scrut
Top achievements
Rank 1
scrut asked on 28 May 2008, 03:44 PM
How would I create a JavaScript-Function that checks all nodes in a tree and expands the tree at the same time?

And how would I do the reverse (uncheck all nodes and collapse the entire tree)?

Thanks

s.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 29 May 2008, 03:50 PM
Hello scrut,

You can use the get_allNodes() method to access all tree nodes. Then you can easily traverse them and use their set_checked(), set_expanded() methods to check/uncheck and expand/collapse them.
The following documentation topics may be helpful:

http://www.telerik.com/help/aspnet-ajax/tree_clientradtreeviewobject.html
http://www.telerik.com/help/aspnet-ajax/tree_clientradtreenode.html

Regards,
Albert
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
TreeView
Asked by
scrut
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or