ChildrenCount: Number
The ChildrenCount property determines a number of the tree node children.
Use JSON or the setChildrenCount method to set the property value and the getChildrenCount 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 a number of child elements of the node with the Africa contents:
// Get the number of child nodes of the node with the Africa contents console.log("Number of child elements of the node with the Africa contents: " + treeList.findText("Africa").getChildrenCount());
As a result the console displays the number of the node child elements:
The number of child elements of the node with the Africa contents: 3
See also: