DimTreeView.selectLevel

Syntax

selectLevel(level: Number, callback: Function || PP.Delegate);

Parameters

level. Level number.

callback. Callback function.

Description

The selectLevel method selects all elements on the specified level.

Example

To execute the example, the HTML page must contain the DimTree component named dimTree (see Example of Creating the DimTree Component). Expand the first tree element. Expand the first element of the first element. Set if selected elements are expanded. Select all element of the second level:

// Set if selected nodes are expanded
dimTree.setExpandToSelected(True);
// Select all elements of the second level
dimTree.selectLevel(2);
// Refresh the entire tree
dimTree.refreshAll();
// Refresh element selections
dimTree.refreshSelection();

As a result the list is refreshed and selected elements of the second level are expanded:

Deselect all elements if the second level:

// Deselect all elements of the second level
dimTree.deSelectLevel(2);
dimTree.refreshSelection();

As a result all elements of the second level are deselected:

See also:

DimTreeView