Skip to main content
Tab

GridViewBandColumn Class

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

public class GridViewBandColumn :
    GridViewColumn

Remarks

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

Header bands allows you to organize columns into logical groups. They do not have associated data cells and are displayed only as a top-level header of the grid.

Run Demo: ASPxGridView - Header Bands Watch Video: ASPxGridView - Header Bands

GridView - Header Bands

<dx:ASPxGridView ID="Grid" runat="server" AutoGenerateColumns="false" 
                 KeyFieldName="OrderID" DataSourceID="InvoicesDataSource" Width="100%">
    <Columns>
        <dx:GridViewDataTextColumn FieldName="Salesperson" Caption="Sales Person" />
        <dx:GridViewBandColumn Caption="Order">
            <Columns>
                <dx:GridViewBandColumn Caption="Company">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="CompanyName" Caption="Name" />
                        <dx:GridViewDataTextColumn FieldName="Country" />
                        <dx:GridViewDataTextColumn FieldName="Region" />
                    </Columns>
                </dx:GridViewBandColumn>
                <dx:GridViewDataDateColumn FieldName="OrderDate" Caption="Date" />
                <dx:GridViewBandColumn Caption="Product">
                    <Columns>
                        <dx:GridViewDataTextColumn FieldName="ProductName" Caption="Name" />
                        <dx:GridViewDataTextColumn FieldName="UnitPrice">
                            <PropertiesTextEdit DisplayFormatString="c" />
                        </dx:GridViewDataTextColumn>
                    </Columns>
                </dx:GridViewBandColumn>
                <dx:GridViewDataTextColumn FieldName="Quantity" Caption="Qty" />
            </Columns>
            <HeaderStyle HorizontalAlign="Center" />
        </dx:GridViewBandColumn>
    </Columns>
    <Settings ShowGroupPanel="true" />
</dx:ASPxGridView>
See Also