GridViewBase.GroupRowTemplate Property
Gets or sets the template that defines the presentation of 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
Property Value
Type | Description |
---|---|
DataTemplate | A DataTemplate object that defines the presentation of group rows. |
Remarks
The template’s data context is a GroupRowData object.
The GroupRowTemplate
property allows you to modify the entire group row. Use the GridViewBase.GroupValueTemplate property to customize group values only.
<dxg:TableView.GroupRowTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<dxg:GridGroupExpandButton IsChecked="{Binding IsRowExpanded}"
Command="{Binding View.Commands.ChangeGroupExpanded}"
CommandParameter="{Binding RowHandle.Value}"/>
<Image Source="{dx:DXImage 'SvgImages/Icon Builder/Business_World.svg'}"
Width="16" Height="16"
Visibility="{DXBinding 'GroupValue.Column.FieldName == `Country`',
Converter={dxmvvm:BooleanToVisibilityConverter}}"/>
<TextBlock Text="{Binding GroupValue.Text}"/>
</StackPanel>
<Button Content="Add" Grid.Column="1" Height="25"
HorizontalAlignment="Right"
Command="{Binding View.DataContext.AddCommand}"/>
</Grid>
</DataTemplate>
</dxg:TableView.GroupRowTemplate>
The GridControl does not display group summaries if you specify the GroupRowTemplate
property.
Refer to the following help topic for more information: Appearance Customization.
See Also