Can I set a different sort field on a column, so when I click 'sort' on the "Name" column it sends the field "Surname" to the server in the sort query. Like SortExpression on the RadGrid?
1 Answer, 1 is accepted
0
Kostadin
Telerik team
answered on 16 Dec 2015, 09:09 AM
Hello Alanm,
Thank you for contacting us.
Generally you can get the sort configuration and modify it the way you want. Please check out the following code snippet which demonstrates how to access the sort expressions.
// Get the grid object
var grid = $("#grid").data("kendoGrid");
// Get the datasource bound to the grid
var ds = grid.dataSource;
// Get current sorting
var sort = ds.sort();
After you get the sort collection you can add/remove sort objects from it.