Skip to main content

GridBandCollection.Insert(Int32, GridBand) Method

Adds the specified band to the specified position within the collection.

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v24.2.dll

Declaration

public virtual void Insert(
    int position,
    GridBand band
)

Parameters

Name Type Description
position Int32

An integer value representing the zero-based index at which the specified band should be inserted. If negative or exceeds the number of elements, an exception is raised.

band GridBand

A GridBand object representing the band to be inserted.

Remarks

Note: A band cannot be inserted into the collection if it is the collection’s parent. In this case, a System.ArgumentException exception is thrown. Use the GridBandCollection.CanAdd method to determine whether a particular band can be added to the collection.

See Also