GridBandCollection.Insert(Int32, GridBand) Method

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

Namespace: DevExpress.XtraGrid.Views.BandedGrid

Assembly: DevExpress.XtraGrid.v20.1.dll


public virtual void Insert(
    int position,
    GridBand band
Public Overridable Sub Insert(
    position As Integer,
    band As GridBand


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