Skip to main content

TabCollection.Insert(Int32, Tab) Method

Inserts the specified tab object into the collection at the specified index.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v22.2.dll

NuGet Package: DevExpress.Web


public void Insert(
    int index,
    Tab tab


Name Type Description
index Int32

The zero-based index location where a specific tab object should be inserted.

tab Tab

A Tab object representing the tab to insert into the tab collection.


This method allows an existing tab object to be inserted into the current tab collection.

If the index parameter value is negative or exceeds the number of elements within the collection, a ArgumentOutOfRangeException exception is raised. When inserting a new tab, the elements that follow the insertion point move down to accommodate the new element. The indexes of the moved elements are updated as well.

To append a tab object to the collection, use the TabCollection.Add method. To remove the previously added tab, use the TabCollection.Remove method. You can also use the Clear() method to remove all tabs from the collection.

See Also