TreeListBase.setSelectedForLevel

Syntax

setSelectedForLevel(level, value, fireEvents, ignoreRules);

Parameters

level. Number. Level.

value. Boolean. Set value.

fireEvents. Boolean. Generate event on value changed. By default it is set to true.

ignoreRules. Boolean. Ignore rules. By default it is set to false.

Description

The setSelectedForLevel method selects all nodes of the specified level.

Example

Executing the example requires the SimpleTreeList component with the Tree identifier (see Example of Creating the SimpleTreeList Component).

// Select all children of the root element
Tree.setSelectedForLevel(0, true);

After executing the example all nodes of the root level are selected.

See also:

TreeListBase