Add following code in "ajax" option of server side datatable:
"ajax": {
"url": "/url",
"type": "GET",
"data": function (d,e) {
var requestData = {
draw: d.draw,
length: d.length,
SortColumn: d.order[0]["column"],
SortColumnName: e.aoColumns[d.order[0]["column"]].sTitle,
SortDirection: d.order[0]["dir"],
length: d.length,
search: d.search.value,
start: d.start
};
return requestData;
},
"dataSrc": function (json) {
return json;
}
}
No comments:
Post a Comment