Hello.
I need to convert kendo sorting and filtering parameters like this:
Instead of this parameters:
sort[0][field] = title
sort[0][dir] = asc
sort[1][field] = description
sort[1][dir] = asc
I need single orderBy parameter like this:
orderBy = title asc, description desc
Can you show me how can I get this?
I need to convert kendo sorting and filtering parameters like this:
Instead of this parameters:
sort[0][field] = title
sort[0][dir] = asc
sort[1][field] = description
sort[1][dir] = asc
I need single orderBy parameter like this:
orderBy = title asc, description desc
Can you show me how can I get this?
$(document).ready(function () { convertSort = function (sort) { //TODO: Convert sorting parameters. }; $("#grid").kendoGrid({ dataSource: { type: "json", transport: { read: "Read", parameterMap: function (options) { return { page: options.page, pageSize: options.pageSize, orderBy: convertSort(options.sort) } } }, schema: { data: "Items", total: "Total" }, pageSize: 5, serverPaging: true, serverFiltering: false, serverGrouping: false, serverSorting: true }, pageable: true, filterable: false, groupable: false, sortable: { mode: "multiple", allowUnsort: true }, columns: [ { field: "Name", title: "Naziv" }, { field: "Title", title: "Naslov" }, { field: "Description", title: "Opis" } ] }); });