Skip to main content

DxGridDataColumn.AllowGroup Property

Specifies whether users can group data by this column.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public bool? AllowGroup { get; set; }

Property Value

Type Default Description
Nullable<Boolean> null

null to inherit the value from the DxGrid.AllowGroup property;
true to allow users to group data by this column;
false to prevent users from grouping data by this column.


The DxGrid allows users to group its data. To enable data grouping and display the Group Panel, set the DxGrid.ShowGroupPanel property to true.

Users can drag and drop a column header onto the Group Panel to group data by this column. They can also drag headers within this panel to change the group order. To ungroup data by a column, users should drag the column header from the Group Panel back to the Column Header Panel.

Group Data

Set the AllowGroup property to false to disable data grouping for an individual column.

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

<DxGrid Data="GridDataSource"
        <DxGridDataColumn FieldName="OrderDate"
                      DisplayFormat="d" />
        <DxGridDataColumn FieldName="Customer"
        <DxGridDataColumn FieldName="Freight"

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

    protected override void OnInitialized() {
        Northwind = NorthwindContextFactory.CreateDbContext();
        GridDataSource = Northwind.Orders
            .Include(i => i.Customer)
            .Include(i => i.OrderDetails)
            .Include(i => i.ShipViaNavigation)

    void OnCustomizeCellDisplayText(GridCustomizeCellDisplayTextEventArgs e) {
        if (e.FieldName == "Customer") {
            var customer = (Customer)e.Value;
            e.DisplayText = $"{customer.CompanyName} ({customer.Country}, {customer.City})";

    public void Dispose() {

To disable grouping for the entire grid, use the DxGrid.AllowGroup property.

You can use the column’s GroupIndex property or GroupBy method to group data in code regardless of the AllowGroup property value.

Run Demo: Grid - Group Data

Watch Video: Grid - Group Data

For more information about data grouping in the Grid component, refer to the following topic: Group Data in Blazor Grid.


See Also