Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TableView.BandHeaderTemplate Property

Gets or sets the template that defines the appearance of band headers. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public DataTemplate BandHeaderTemplate { get; set; }

#Property Value

Type Description
DataTemplate

A DataTemplate object that defines the appearance of band headers.

#Remarks

The data context for the BandHeaderTemplate property is the GridControlBand.Header property’s value. The following code sample wraps text in band headers:

Data Grid - Custom Band Header

<dxg:GridControl.View>
    <dxg:TableView x:Name="view" AutoWidth="True">
        <dxg:TableView.BandHeaderTemplate>
            <DataTemplate>
                <TextBlock Text="{Binding}" TextWrapping="Wrap"/>
            </DataTemplate>
        </dxg:TableView.BandHeaderTemplate>
    </dxg:TableView>
</dxg:GridControl.View>

Refer to the following help topic for more information: Bands.

See Also