Back to Devexpress

GridViewBase.GroupRowStyle Property

wpf-devexpress-dot-xpf-dot-grid-dot-gridviewbase-d7dc5cc6.md

latest3.1 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public Style GroupRowStyle { get; set; }
vb
Public Property GroupRowStyle As Style

Property Value

TypeDescription
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:

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

PrintGroupRowStyle

GridViewBase Class

GridViewBase Members

DevExpress.Xpf.Grid Namespace