I have problem with jqGrid plugin. If I am on e.g. 2nd page, and I want to change the sorting direction of any column, to the server goes as a URL param page=1
(but should be page=2
) What's wrong ?
<table id="list" class="scroll " cellpadding="0" cellspacing="0"></table>
<div id="pager" class="scroll" style="text-align:center;"></div>
$(function () {
$("#list").jqGrid({
url: '/Control/UsersGridData/',
datatype: 'json',
mtype: 'GET',
colNames: ['Name', 'User ID', 'Is Active', 'Last Action', 'Country'],
colModel: [
{ name: 'Name', index: 'Name', width: 120, align: 'center', sortable: true, search: true },
{ name: 'UserID', index: 'UserID', width: 120, align: 'center', sortable: true, search: true },
{ name: 'IsActive', index: 'IsActive', width: 50, align: 'center', sortable: true, search: true },
{ name: 'LastAction', index: 'LastAction', width: 90, align: 'center', sortable: true, search: true },
{ name: 'Country', index: 'Country', width: 40, align: 'center', sortable: true, search: true }],
pager: jQuery('#pager'),
rowNum: 20,
rowList: [5, 10, 20, 50],
sortname: 'Name',
sortorder: "desc",
viewrecords: true,
imgpath: '/scripts/themes/coffee/images',
width: '800'
});
});