Back to Devexpress

GridViewBandColumn Class

aspnet-devexpress-dot-web-d6b30b72.md

latest3.8 KB
Original Source

GridViewBandColumn Class

A band column.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class GridViewBandColumn :
    GridViewColumn
vb
Public Class GridViewBandColumn
    Inherits 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 BandsWatch Video: ASPxGridView - Header Bands

aspx
<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>

Implements

IStateManager

IPropertiesOwner

IExpressionsAccessor

IWebGridColumn

Inheritance

Object StateManager CollectionItem WebColumnBase GridViewColumn GridViewBandColumn BootstrapGridViewBandColumn

MVCxGridViewBandColumn<RowType>

MVCxGridViewBandColumn

See Also

GridViewBandColumn Members

Grid View

DevExpress.Web Namespace