Expand all tree nodes
Expand all tree nodes
You can use
Tree.expandAll
to expand tree nodes at multiple levels. Use this only for tree views that contain relatively few nodes; otherwise the process of expanding all nodes may take a long time, and the user will not be able to perform other tasks while the tree is updating.
For example, suppose the tree has these levels: Country, City, Property, Building, Lease; you can do the following:
Expand all nodes at levels:
tree.expandAll();
Expand all nodes on levels up to the Building level, so that buildings are visible, but leases are not:
tree.expandAll(3); // up to level 3, 0-based
Example view: http://localhost:8080/archibus/schema/ab-products/solutions/parts/tree/ab-ex-tree-after-get-data.axvw