HasChildSelected: Boolean
The HasChildSelected property determines whether tree node has any selected child element.
Available values:
true. The tree has selected children;
false. The tree has no selected children.
Use JSON or the setHasChildSelected method to set the property value and the getHasChildSelected method to get the property value.
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: