Skip to main content
A newer version of this page is available. .
Tab

GridViewBandColumn Class

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public class GridViewBandColumn :
    GridViewColumn

Remarks

A GridViewBandColumn object allows you to combine other grid columns in its GridViewColumn.Columns collection.

Concept

Bands

Example

Declaratively:

<dx:ASPxGridView ID="Grid" runat="server"... >
    <Columns>
        <dx:GridViewBandColumn Caption="Order">
            <Columns>
                <dx:GridViewBandColumn Caption="Company">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="CompanyName" Caption="Name" />
                        ...
                    </Columns>
                </dx:GridViewBandColumn>
            ...
            </Columns>
        </dx:GridViewBandColumn>
    </Columns>
</dx:ASPxGridView>

In code:

ASPxGridView grid1 = new ASPxGridView();
grid1.ID = "grid1";
Page.Form.Controls.Add(grid1);
...
GridViewBandColumn band1 = new GridViewBandColumn();
band1.Caption = "Order";

GridViewBandColumn band2 = new GridViewBandColumn();
band2.Caption = "Company";        

GridViewDataTextColumn textcol = new GridViewDataTextColumn();
textcol.FieldName = "CompanyName";

band1.Columns.Add(band2);
band2.Columns.Add(textcol);

Online Example

ASPxGridView - How to create header and data cell bands

Online Demo

ASPxGridView - Header Bands

Online Video

ASPxGridView - Header Bands

See Also