Skip to main content

GridViewBase.GroupRowStyle Property

Gets or sets the style applied to group rows. 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 GroupRowStyle { get; set; }

Property Value

Type Description
Style

A Style object that represents the style applied to group rows.

Remarks

Target Type: dxg:GroupRowControl

Data Context: GroupRowData

The following code sample uses the GroupRowStyle property to conditionally customize group rows:

WPF Grid - GroupRowStyle Example

<dxg:TableView.GroupRowStyle>
    <Style TargetType="dxg:GroupRowControl">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding GroupValue.Column.FieldName}" Value="Country"/>
                    <Condition Binding="{Binding SelectionState}" Value="None"/>
                    <Condition Binding="{Binding Level}" Value="1"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Background" Value="Orange"/>
            </MultiDataTrigger>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding GroupValue.Column.FieldName}" Value="ProductName"/>
                    <Condition Binding="{Binding SelectionState}" Value="None"/>
                    <Condition Binding="{Binding Level}" Value="0"/>
                </MultiDataTrigger.Conditions>
                <Setter Property="Background" Value="LightGreen"/>
            </MultiDataTrigger>
            <DataTrigger Binding="{Binding SelectionState}" Value="Focused">
                <Setter Property="Background" Value="LightBlue"/>
            </DataTrigger>
        </Style.Triggers>
    </Style>
</dxg:TableView.GroupRowStyle>

Note

If group rows are of different heights, the last (bottom) visible data row may not be displayed entirely.

Refer to the following help topic for more information: Appearance Customization.

See Also