Export (0) Print
Expand All

getTreeNode Method

Retrieves an object representing the given TreeNode.

Syntax

oTreeNode = TREEVIEW.getTreeNode(index)

Parameters

index Required. The index of the TreeNode.

Return Value

Returns the TreeNode object at the specified index.

Remarks

If index is an invalid value, this method returns null.

Example

This example returns the value of the text attribute of the selected TreeNode. It assumes that the treeview has an id value of treeview_one. The attributes of the TreeNode object are set or retrieved using the getAttribute and setAttribute methods.


var myNode = treeview_one.getTreeNode(treeview_one.selectedNodeIndex);
alert(myNode.getAttribute("text"));

Applies To

TREEVIEW

See Also

Show:
© 2014 Microsoft