This feature was already requested in another post, but it was missunderstood. (http://kendoui-feedback.telerik.com/forums/127393-kendo-ui-feedback/suggestions/11578722-support-sorting-datasource-groups) The idea is to allow for Groups in DataSources to be sorted in ways other than alphabetically; this will allow for certain groups to be given priority.
Hello, Ron,
Here is an example for your reference where the custom sort order in the group is defined by the value of another field. The example shows the days being ordered by the val field:
https://dojo.telerik.com/@bubblemaster/EcecISAb/3
groupable: {
sort: {
compare: function(a, b) {
if (a.items[0].val === b.items[0].val) {
return 0;
} else if (a.items[0].val > b.items[0].val) {
return 1;
} else {
return -1;
}
}
}
}
Let us know in case you have further questions.
Kind Regards,
Alex Hajigeorgieva
Progress Telerik
This becomes really handy when you display a list of entries sorted by date/time, and then you need to group them by some other field. Without that feature implemented, the order of items becomes completely random.
It would be very helpful if the user could provide the group "comparator" function. That way we can write an kind of sorting order we wish
I completely agree with Kris
Hope this includes sorting on a different field than grouped on too (ie group on ID, sort on Name). In most good database designs, you want to be sorting on an ID not a group name which is not guaranteed to be unique.