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

Schedule - sortComparer not working

After adding the sort by ranking option to eventsettings, events stop displaying.

<e-schedule-eventsettings dataSource="@ViewBag.datasource" sortComparer=sortComparer>

Net Core 2.2

.EJ2 20.4.38


Attachment: AspnetcoreSync_db47cacc.zip

5 Replies

SR Swathi Ravi Syncfusion Team January 6, 2023 01:46 PM UTC

Hi Lukasz,


We confirmed your reported problem “Schedule sortComparer not working” as a bug and logged the defect report. The fix for this defect will be included in our upcoming weekly patch release, which is expected to be rolled out by mid of January 2023. You can track the status of the fix at the following link:


Feedback : https://www.syncfusion.com/feedback/40245/schedule-sortcomparer-not-working


Disclaimer: Inclusion of this solution in the weekly release
may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Swathi Ravi



RV Ravikumar Venkatesan Syncfusion Team January 19, 2023 09:37 AM UTC

Lukasz, We couldn’t include the fix as promised due to the complexity of the issue, and it will be fixed in the patch release scheduled for the upcoming week. We will let you know once it is included.



RV Ravikumar Venkatesan Syncfusion Team February 1, 2023 04:16 PM UTC

Lukasz, The fix for the issue “Schedule sortComparer not working in ASP .NET Core” has been included in our SP release 20.4.48. Upgrade to the latest version to resolve the issue.


Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/ej2_core_schedule_sortcomparer1469962718



LU Lukasz February 17, 2023 03:27 PM UTC

Hi  Ravikumar,

Now it works propertly- thank you.

Please note, that localeCompare works only for string values, so if RankId is integere, we have to to converion:

return event1.RankId.toString().localeCompare(event2.RankId.toString());


If RankId is number we just need to do:

return args.sort(function (event1, event2) { event1.RankId - event2.RankId });


RV Ravikumar Venkatesan Syncfusion Team February 20, 2023 05:14 PM UTC

Lukasz,


You are welcome. Thanks for sharing the details.


Loader.
Live Chat Icon For mobile
Up arrow icon