我有 jqGrid 插件的问题。如果我在例如第二页,并且我想更改任何列的排序方向,服务器将作为 URL 参数page=1
(但应该是page=2
)有什么问题?
<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'
});
});