Skip to main content
Tab

NavBarGroupCollection.IndexOfText(String) Method

Searches for a group object specified by the value of its NavBarGroup.Text property and returns the zero-based index of the first occurrence within the group collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public int IndexOfText(
    string text
)

Parameters

Name Type Description
text String

A String value representing the NavBarGroup.Text property value of the required group.

Returns

Type Description
Int32

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

Remarks

The IndexOfText method enables you to determine where a group specified by the NavBarGroup.Text property value is located within the group collection represented by the current object. The collection of group objects can be accessed via the ASPxNavBar.Groups property of a navbar control.

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

See Also