Tab
A newer version of this page is available. Switch to the current version.

EditButtonCollection.IndexOfText(String) Method

Searches for an editor button by its display text and returns the zero-based index of its first occurrence within the collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v18.2.dll

Declaration

public int IndexOfText(
    string text
)
Public Function IndexOfText(
    text As String
) As Integer

Parameters

Name Type Description
text String

A String value representing the display text of the item which is to be located in the collection.

Returns

Type Description
Int32

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

Remarks

The IndexOfText method finds an editor button by its display text within the current collection.

This method searches the collection for the specified button and if found returns the index value of its first occurrence. If no instance is found, a negative one (-1) is returned instead. The collection is searched in a forwards direction starting at the first element and ending at the last element.

See Also