Grouping and sorting

Is there a way to group datagrid data and sort in descending mode the group content ?

I'm grouping by a date field and I'd like to show both group column and the data inside in descending order

Something like:

-- December 

   --- 31/12/2025

   --- 30/12/2025

   ......

-- November

   --- 30/11/2025

   --- 29/11/2025

and so on

I managed to show the month name in the grouping column and to sort in desending order the date inside every group by I'm not able to sort also the grouping column

What I get is something like this

-- November

   --- 30/11/2025

   --- 29/10/2025

   ......

-- December

   --- 31/12/2025

   --- 30/12/2025

and so on




1 Reply

RM RiyasHameed MohamedAbdulKhader Syncfusion Team April 24, 2025 01:47 PM UTC

Hi Walter Martin,

We would like to inform you that you can achieve your requirement by using the GroupColumnDescription.KeySelector property to specify your custom logic, and the GroupColumnDescription.ColumnName property to define the column to group by. To sort the group in descending order, you can use a custom comparer. Additionally, you can sort the data within the group using SortColumnDescriptors.
For your reference, please find the relevant documentation links below:
Additionally, we have prepared a simple sample based on your requirement and attached it below. Please have a look at the sample. If you have any further queries, feel free to reach out to us.
Regards,
Riyas Hamed M




Attachment: DataGridGroupingSample_f47dcfb0.zip

Loader.
Up arrow icon