Tab

TreeViewNodeCollection.IndexOfName(String) Method

Searches for a node object specified by the value of its TreeViewNode.Name property, and returns the zero-based index of the first occurrence within the collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public int IndexOfName(
    string name
)
Public Function IndexOfName(
    name As String
) As Integer

Parameters

Name Type Description
name String

A String value representing the TreeViewNode.Name property value of the required node.

Returns

Type Description
Int32

The zero-based index of the first occurrence of the node with the specified name within the collection, if found; otherwise, the negative index (-1).

Remarks

The IndexOfName method enables you to determine where a node specified by the TreeViewNode.Name property value is located within the collection represented by the current object.

This method searches the collection for the specified node, and if found, returns the index value of the first occurrence. If no instance is found, the negative index (-1) is returned. The collection of nodes is searched forward, starting with the first element, and ending with the last one.

See Also