Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridBandCollection.Insert(Int32) Method

Creates a new band and adds it at the specified position within a collection.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

public virtual GridBand Insert(
    int index
)

#Parameters

Name Type Description
index Int32

An integer value representing the zero-based index at which the new band should be inserted.

#Returns

Type Description
GridBand

A GridBand object representing the new band.

#Remarks

If the index parameter value is zero or negative, the new band is added to the beginning of the band collection. If it is greater than or equal to the number of elements, the new band is appended to the collection. Bands following the insertion point move down to accommodate the new band. Their indexes are also updated.

See Also