Skip to main content

ASPxClientTreeView.GetNodeByName(name) Method

Returns a node with the specified name.

Declaration

GetNodeByName(
    name: string
): ASPxClientTreeViewNode

Parameters

Name Type Description
name string

The name of the node.

Returns

Type Description
ASPxClientTreeViewNode

The node with the specified name.

Remarks

Use the ASPxClientTreeView.GetNodeByName method to get a client node object with the specified name.

This method searches the specified node among all nodes of the ASPxTreeView control by the TreeViewNode.Name property (at all nesting levels). It returns null if you pass an invalid name to the parameter.

You can use the ASPxClientTreeViewNode.GetNodeByName method to access a ASPxTreeView node’s child with the specified name.

Note

This method returns an incorrect value if the EnableClientSideAPI property is set to false (default). Set this property to true to enable access to a control’s client-side object.

Example

The code below selects a node with the specified Name property value (“MyDocuments”).

var node = treeview.GetNodeByName('MyDocuments');
treeview.SetSelectedNode(node);
See Also