This is a migrated thread and some comments may be shown as answers.

Is there a way to edit a column's sort method after pageload?

1 Answer 117 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 28 Jan 2014, 11:21 PM
Hello, I'm wondering if there is a way to inject a function into the kendo grid to sort a column after page load.

My issue is we are using MVC fluent wrappers to build the site and the option I need isn't available (compare), and I want to know if I can inject a compare method into the column in question.
I've tried setting
$("#ReportsGrid").data("kendoGrid").columns[3].sortable.compare

but that doesn't affect anything at run time.

Any ideas?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 30 Jan 2014, 12:52 PM
Hi Andrew,

I am afraid that setting the columns.sortable.compare function is not supported in MVC wrappers. The recommended approach in your case is to enable the server sorting (serverOperations are enabled by default) and implement your custom sorting logic in the controller.

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or