Need Solution To implement server side sorting in kendo grid -


i trying implement server side sorting kendo grid in mvc application. sorting option not showing. have double checked have enabled necessary option (made serversorting true the kendo grid data source , made scrollable true grid element) still able find sortable option. below kendo grid code

kendo grid script

var grid = $("#grid");     grid.children().remove();     grid.kendogrid({         columns: [{attributes:"",field:"",template:"${resultfields[0].value},title:"column 1",width:"110px"},{attributes:"",field:"",template:"${resultfields[1].value},title:"column 1",width:"110px"}],         resizable: true,         reorderable: true,         scrollable: true,         filterable: true,         columnmenu: true,         selectable: "row",         selectable: "multiple",         databound: function () { alert("data bound"); },         datasource: {             transport: {                 read: {                     url: '@url.action("index", "kendoserversidesorting")',                     type: "get",                     datatype: "json",                     traditional: true,                     data: {                         itemtypeid: 1,                         where: values,                         orderby: ["", "", ""],                     },                 },             },             schema: {                 data: "items",                 total: "totalitems",             },             serverpaging: true,             pagesize: 10,             error: function (e) {                 alert(e.errors);             }         },         pageable: {             pagesize: 10,             input: true,             pagesizes: [10, 20, 30, 50, 100, 250],         },         change: function () { alert("change event"); },     }) 

controller action this

public jsonresult search(int itemtypeid, int skip, int take, string[] where, string[] orderby)     {         var v = kernel.get<iitemsearch>().search(itemtypeid, skip, take, where, orderby);         return json(v, jsonrequestbehavior.allowget);     } 

*can me resolve issue. *

you can use helper functionality kendogridbinderex parse commands (like filter , sort) , filtering , sorting @ server-side automatically using dynamiclinq.

see project : https://github.com/stefh/kendogridbinderex examples.
also available nuget package : https://www.nuget.org/packages/kendogridbinderex/


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -