Searches for a node object specified by the value of its TreeViewNode.Text property, and returns the zero-based index of the first occurrence within the collection.
NuGet Package: DevExpress.Web
public int IndexOfText( string text )
Public Function IndexOfText( text As String ) As Integer
The zero-based index of the first occurrence of the specified node within the collection, if found; otherwise, the negative index (-1).
The IndexOfText method enables you to determine where a node specified by the TreeViewNode.Text property value is located within the node 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.