Skip to main content

DxGridDataColumn.GroupRowTemplate Property

Specifies a template used to display group rows when the Grid is grouped by this column.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor


public RenderFragment<GridDataColumnGroupRowTemplateContext> GroupRowTemplate { get; set; }

Property Value

Type Description

The template for the column’s group rows.


The GroupRowTemplate allows you to specify custom content and appearance for group rows when the Grid is grouped by this column. To define a common template for all group rows in the Grid, use the DxGrid.DataColumnGroupRowTemplate.

The GroupRowTemplate accepts a GridDataColumnGroupRowTemplateContext object as the context parameter. You can use the parameter’s members to get information about the current group row (for instance, GroupValue, SummaryItems, DataColumn, and so on). You can also access the Grid object and use its members to obtain additional information about the Grid.

The following code snippet customizes group rows displayed when Grid data is grouped by the Country column. Group rows contain the Country field value and summary values highlighted in bold.

@using Microsoft.EntityFrameworkCore
@inject IDbContextFactory<NorthwindContext> NorthwindContextFactory
@implements IDisposable

<DxGrid Data="@Data"
        <DxGridDataColumn FieldName="Country" GroupIndex="0">
                <text>@context.DataColumn.FieldName: @context.GroupValue</text>
                    var summaryItems = context.Grid.GetGroupSummaryItems();
                    if (summaryItems.Any()) {
                        <text> (</text>
                        foreach (var i in summaryItems) {
                            if (i != summaryItems.First()) {
                                <text>, </text>
                            @context.Grid.GetGroupSummaryLabel(i, context.VisibleIndex)
                            <text>: </text>
                            <b>@context.Grid.GetGroupSummaryFormattedValue(i, context.VisibleIndex)</b>
        <DxGridDataColumn FieldName="City" />
        <DxGridDataColumn FieldName="OrderDate"/>
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c" />
        <DxGridDataColumn FieldName="Quantity" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Count" FieldName="Country" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Max" FieldName="OrderDate" />

@code {
    object Data { get; set; }
    NorthwindContext Northwind { get; set; }

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        Data = Northwind.Invoices

    public void Dispose() {

Blazor Grid Group Row Template

Run Demo: Grid - Group Row Template

For more information, refer to the following topics:


See Also