TreeListBase.checkSelection

Syntax

checkSelection(nodeKey, fireEvents);

Description

The checkSelection method checks whether nodes are selected correctly.

Parameters

nodeKey. String. Checked node. Optional parameter. To check all nodes, set the value "".

fireEvents. Boolean. Generate change event. Optional parameter.

Example

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

// Enable single selection mode
Tree.setSelectionMode(PP.Ui.TreeListSelectionMode.SingleSelect);
// Select several nodes regardless of the rules
Tree.setNodeSelected(1, true, false, true);
Tree.setNodeSelected(2, true, false, true);
Tree.setNodeSelected(0, true, false, true);
// Check selection
Tree.checkSelection()

After executing the example single selection mode is enabled, several nodes are selected, and the nodes that do not satisfy single selection condition are corrected.

See also:

TreeListBase