I'm using the MVC wrappers, but cannot figure out the syntax to make it work in my grid, or find an example. Could you provide me with an example of this functionality using the MVC wrapper?
9 Answers, 1 is accepted
At the moment setting a custom sortable compare function is not possible in the MVC Wrappers. The users of the Kendo UI Web Grid have posted multiple requests for documenting this feature, so we decided to add it to the configuration documentation.
Please excuse us if this causing any inconvenience.
Regards,
Dimiter Madjarov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

I need to filter by date, but display and sort by datetime. This is how our grid sorting worked in Telerik for WebForms, but the feature is absent in this newer product.
This feature is not planned for implementation in the MVC wrappers, because even if implemented it won't be able to handle server operations.
Regards,
Dimiter Madjarov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Dear Dimiter,
As it is not possible to initialize a compare js function when using a MVC Wapper is it possible to add on after the page loads. With js and by calling the kendoGrid object .
var grid = $("#myGrid").data("kendoGrid);
grid.columns["ProductiName"].columns.sortable.compare = myfunction or functionfunction(){}
or
grid.columns[0].columns.sortable.compare = myfunction or function(){}
Yours,
Ariel
Hello Ariel,
Setting a compare function for the field, after the widget is initialized is not a supported scenario.
Regards,Dimiter Madjarov
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Dear Dimiter,
Is there a way to take the grid created by the wrapper cloning it using it to create a new grid with adding the compare functions.
when I tried to add a compare function to an existing grid it had no affect as you said because it was not done before init stage/
But if I clone the object add the functions and the re-init the grid using the datasource of the cloned grid will it work?
Yours,
Ariel
Hello Ariel,
Cloning the options won't solve the problem. As a solution for the current case I would suggest you to either use custom binding, as demonstrated in the following documentation page, and sort the data using custom compare function on the server side or use the Kendo UI Web grid.
Regards,Dimiter Madjarov
Telerik
See What's Next in App Development. Register for TelerikNEXT.

Hello Patrick,
The information in the previous answers is still relevant regarding the current case. The feature is not planned to be implemented in the MVC wrappers. The possible workarounds are described in my last post.
Regards,Dimiter Madjarov
Telerik by Progress