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

Creating Bands

To access the grid’s GridControl.Bands collection, invoke the Bands edit form:

collectioneditor_bands

This form allows you to add, delete, access and customize band settings, and perform other common collection management tasks.

Each band has its own GridControlBand.Bands collection.

The following code shows how to create bands in XAML.

<dxg:GridControl ItemsSource="{Binding}">
        <dxg:GridControl.Bands>
            <dxg:GridControlBand Header="Band" VisibleIndex="0">
                <dxg:GridColumn FieldName="Id" VisibleIndex="1" dxg:BandBase.GridRow="1"/>
                <dxg:GridColumn FieldName="Number" VisibleIndex="0"/>
                <dxg:GridColumn FieldName="Name" VisibleIndex="2" dxg:BandBase.GridRow="1"/>
            </dxg:GridControlBand>
            <dxg:GridControlBand Header="Band" VisibleIndex="1">
                <dxg:GridColumn FieldName="Description" VisibleIndex="3"/>
            </dxg:GridControlBand>
        </dxg:GridControl.Bands>
        <dxg:GridControl.View>
            <dxg:TableView />
        </dxg:GridControl.View>
    </dxg:GridControl>

You can also create bands using the smart tag panel. Click the smart-tag glyph at the top right corner of the control (or any band) and select Add Band.

smarttag_addband

See Also