TreeNodes.getItemByKey

Syntax

getItemByKey (key)

Parameters

key. Node key.

Description

The getItemByKey method returns a node by its key.

Example

To execute this example, the page must contain the TreeList component named treeList (see Example of Creating the TreeList Component). Edit text for the node with the Last key:

//get the node with the key Last, that is located on the third hierarchy level:

var node = treeList.getNodes().getItem(0).getNodes().getItem(0).getNodes().getItemByKey("Last")

//node name will show its key:

node.setText(node.getKey())

 

After executing this example the node with the key Last is named Last.

See also:

TreeNodes