Skip to main content

TableView.GroupBandSummaryContentStyle Property

Gets or sets the style applied to group summary items aligned by bands. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public Style GroupBandSummaryContentStyle { get; set; }

Property Value

Type Description
Style

A Style object that is the style applied to group summary items aligned by bands.

Remarks

The position of group summaries within a group row is specified by the TableView.GroupSummaryDisplayMode property. If this property is set to AlignByColumns, and columns are arranged within a band, group summaries are aligned by bands.

The following code sample demonstrates how to use the GroupBandSummaryContentStyle property:

GroupBandSummaryContentStyle

<dxg:GridControl.GroupSummary>
    <dxg:GridSummaryItem FieldName="UnitPrice" SummaryType="Average"/>
    <dxg:GridSummaryItem FieldName="Quantity" SummaryType="Sum"/>
</dxg:GridControl.GroupSummary>
<dxg:GridControl.View>
    <dxg:TableView GroupSummaryDisplayMode="AlignByColumns" 
                   ShowGroupedColumns="True">
        <dxg:TableView.GroupBandSummaryContentStyle>
            <Style TargetType="dxg:GroupBandSummaryControl">
                <Setter Property="NormalBackground" Value="Bisque"/>
                <Setter Property="FocusedBackground" Value="LightBlue"/>

                <Setter Property="NormalForeground" Value="Gray"/>
                <Setter Property="FocusedForeground" Value="Black"/>

                <Setter Property="NormalBorderBrush" Value="LightGray"/>
                <Setter Property="FocusedBorderBrush" Value="LightSkyBlue"/>

                <Style.Triggers>
                    <DataTrigger Binding="{Binding HasSummary}" Value="False">
                        <Setter Property="Visibility" Value="Hidden"/>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </dxg:TableView.GroupBandSummaryContentStyle>
    </dxg:TableView>
</dxg:GridControl.View>
See Also