How to Sort Grouped Rows in Syncfusion React GridComponent Based on Group Aggregate Values?

I'm using a Syncfusion React GridComponent that is grouped by a column called "Department" and displays group aggregates like the sum of "Sales Amount". I want to allow users to sort the grouped grid based on these aggregate values—for example, sort the departments by their total sales, either ascending or descending. This sorting should affect the order of the groups themselves, not the rows within each group. Whether it's triggered via a button, a dropdown, or any other UI element, the goal is to let users reorder the group blocks based on computed aggregates like total sales. Since Syncfusion doesn't provide built-in support for sorting by group aggregates, I need to compute the totals manually, sort the data accordingly, and re-bind it to the grid so the new group order is reflected properly.


1 Reply

MR Mohanraj Rengasamy Syncfusion Team June 13, 2025 04:43 AM UTC

Hi Ch Cv,

 

Greetings from Syncfusion support,

 

Based on your query, it seems you want to sort grouped rows in the grid based on group aggregate values.

 

We would like to inform you that currently, the Syncfusion React Grid supports sorting only at the column (field) level and does not provide built-in support for sorting group headers based on aggregate values such as group totals.

 

For more details on the sorting features, please refer to our documentation:

Documentation: https://ej2.syncfusion.com/react/documentation/grid/sorting

 

Regards,

Mohanraj Rengasamy


Loader.
Up arrow icon