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

GridBandCollection.Insert(Int32, GridBand) Method

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

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v18.2.dll


public virtual void Insert(
    int position,
    GridBand band


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.


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