TreeListBase.NodeIndex

Syntax

NodeIndex: Number;

Description

The NodeIndex property determines number of the specified node at the current level.

Comments

Numbers of children start from 0.

Use the setNodeIndex(nodeKey, value) method to set the property value, and the getNodeIndex(nodeKey) method to get the property value.

Parameters:

nodeKey. String. Node identifier

value. Number. Value.

Example

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

// Expand first node
Tree.setNodeExpanded(0, true)
// Get child index
Tree.getNodeIndex(4);
// -> 0

After executing the example index of the first node child is displayed.

See also:

TreeListBase