Skip to main content

TabCollection.IndexOf(Tab) Method

Searches for the specified tab object and returns the zero-based index of the first occurrence within the tab collection.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public int IndexOf(
    Tab tab


Name Type Description
tab Tab

A Tab object representing the tab to locate in the tab collection.


Type Description

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


The IndexOf method enables you to determine where a tab specified by the tab parameter is located within the tab collection represented by the current object. The collection of tab objects can be accessed via the ASPxTabControl.Tabs property of a Tab control.

This method searches the tab collection for the specified tab 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 tabs is searched forward starting with the first element and ending with the last one.

See Also