Custom Grouping

 
Unit Price
Product Name Category Name Country Order Date Quantity
Unit Price: $0.00 - $10.00 (Count: 331)
Unit Price: $10.00 - $20.00 (Count: 849)
Unit Price: $20.00 - $30.00 (Count: 328)
Unit Price: $30.00 - $40.00 (Count: 349)
Unit Price: $40.00 - $50.00 (Count: 129)
Unit Price: $50.00 - $60.00 (Count: 71)
Unit Price: $60.00 - $70.00 (Count: 26)
Unit Price: $70.00 - $80.00 (Count: 1)
Unit Price: $80.00 - $90.00 (Count: 11)
Unit Price: $90.00 - $100.00 (Count: 14)

The DevExpress Blazor Grid allows you to apply custom data grouping logic. Use the steps below to implement custom data grouping logic:

  1. Set the DxGridDataColumn.GroupInterval property to GridColumnGroupInterval.Custom.

  2. Handle the DxGrid.CustomGroup event to implement your logic. You should compare column values and define whether these values belong to the same group. Use the GridCustomGroupEventArgs event arguments (Value1, Value2, SameGroup, etc.) to access and compare column values.

    You can also handle the CustomizeGroupValueDisplayText event to customize text for group rows.

In this demo, custom group logic is implemented for the Unit Price column. Data is grouped for the following intervals: $0.00 — $10.00, $10.00 — $20.00, etc.