TreeNode.HasChildSelected

Syntax

HasChildSelected: Boolean

Description

The HasChildSelected property determines whether tree node has any selected child element.

Comments

Available values:

Use JSON or the setHasChildSelected method to set the property value and the getHasChildSelected method to get the property value.

Example

To execute the example, the page must contain the TreeList  component named «treeList» (see Example of Creating the TreeList Component). Determine whether the node with the Africa contents has selected children.

// Determine whether the node with the Africa contents has selected children
if (treeList.findText("Africa").getHasChildSelected()) {
    console.log("Node with the Africa contents has selected children");
} else {
    console.log("An element with the Africa contents has no selected children);
}

The result of the node checking is displayed to the console:

An element with the Africa contents has no selected children

See also:

TreeNode