-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot implement custom sorting by column: columns.sortable.compare missing on react implementation #633
Comments
I'd like to extend this to grouping as well. I need to be able to group by one field, then sort those groups by another field. |
I am having the same issue. I am trying to sort the columns by natural order and I can't override the compare function. Thanks! |
This will be possible after this is implemented: #819 |
558718 - Requested again to be able to make custom sort inside a group. |
does anyone find any solution for this issue ? |
I noticed this when trying to customize the sorting function dataState is just this:
so apparently we could use this to make our own sorting function, I haven't used it yet, will post here if I have any success. EDIT: You can do this, and you take control of the sorting ⚡ |
I'm submitting a Suggestion for improvement.
I implemeted a Kendo React Grid containing objects with the following structure:
{
createdon: "2020-03-27T16:59:52Z"
createdon_formatted: "3/27/2020 5:59 PM"
id: "91b96a5e-4c70-ea11-80f0-20474790ab5d"
ofs_ruleid: {
Id: "15734fa9-5779-e811-80d6-20474790ab5c"
LogicalName: "ofs_routingrule"
Name: "Validate Individual"
}
ofs_success: false
ofs_success_formatted: "No"
}
One of the columns I defined is using the ofs_ruleid field which is an object, so I implemented the cell property on the Column to use the Id, LogicalName and Name sub properties to create the td tag.
This is working fine, but the problem is that when I try to sort by that field (ofs_ruleid) it doesn't work cause it's an object and not a primitive value like string or dates.
I read that on the JQuery version you can define a compare function on the columns property sortable.compare(https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/columns.sortable#columnssortablecompare) but this is not abailable on Kendo React Grids.
Is there any workaround for this?
Thanks
The text was updated successfully, but these errors were encountered: