getNodeLevel(nodeKey);
nodeKey. Number. Node key.
The getNodeLevel method returns level of the specified node.
Executing the example requires the SimpleTreeList component with the Tree identifier (see Example of Creating the SimpleTreeList Component).
// Get node level Tree.getNodeLevel(4); // -> 1
After executing the example the specified node level is obtained.
See also: