【发布时间】:2011-02-13 20:52:00
【问题描述】:
我想禁用排序,并在 jQuery Grid 插件中启用 altRows。这是我的客户端代码:
var myGrid = $("#list").jqGrid({
url: '/Home/GetData/',
datatype: 'json',
mtype: 'GET',
colNames: ['Id', 'Description'],
colModel: [
{ name: 'Id', width: 40 },
{ name: 'Description', width: 400}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortable: false,
altRows: true,
viewrecords: true,
caption: 'My first grid'
});
我的服务器端控制器动作签名是:
public ActionResult GetData(string sidx, string sord, int page, int rows)
到目前为止,排序仍处于启用状态,并且没有突出显示 altRows。我敢肯定,我错过了一些非常明显的事情,但我终生无法弄清楚是什么。
有什么想法吗?
谢谢, D.
【问题讨论】:
标签: jquery asp.net-mvc asp.net-mvc-3 jqgrid