We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Sorting and Grouping on a Date field

Hi there

When I try to group by a date column the sorting breaks and it is no longer sorted like a proper date, but instead sorts like a string.

the date sorting working fine when not grouped using the SortedColumns_Changing event and changing the .Comparer, it also works fine when you try to sort the group header using the SortedGroupColumns_Changing having changed the .Comparer.

how ever it sorts it incorectly straight after the group is created.

is there another event i can handle?

2 Replies

JO jonathan March 25, 2010 03:07 PM UTC

as an update i have noticed that i'm using version 5.102.0.51

I'll try downloading a newer version and see if that helps.


RC Rajadurai C Syncfusion Team April 6, 2010 09:16 AM UTC

Hi Jonathan,

Thanks for your interest in Syncfusion Products.

Sorting on the date column which is grouped initially, works fine by default. From the provided update, it seems, you were handling the sorting through custom comparer. Could you please let me know the reason for handling custom sorting? There is no need to handle any events explicitly for the default behavior.

The code handled in the CustomComparer class in your application might be responsible for the issue you are facing. If you provide us a minimal sample with the code settings used in your application, it would be fine for us to see the issue and work to provide respective solution.

Regards,
Rajadurai

Loader.
Live Chat Icon For mobile
Up arrow icon