getIndex();
The getIndex method returns tree node index.
To execute the example, the page must contain the TreeList component named «treeList» (see Example of Creating the TreeList Component). Get the node index with the Africa contents:
// Get the node index with the Africa contents console.log("Node index with the Africa node: " + treeList.findText("Africa").getIndex());
As a result, node index with the Africa contents is displayed to the console:
Node index with Africa contents: 1
See also: