jqGrid
我将在下面向网格传递一个JSON对象
format
{
"total":1,
"page":1,
"records":10,
"rows":
[{
"i":1,"cell":["foo","bar"]},
{"i":2,"cell":["foo1","barr"]},
{"i":3,"cell":["foo2","barrr"]}]
}
jQuery("#searchResults").jqGrid({
url: '/Customer/SearchResults/',
datatype: 'json',
mtype: 'GET',
colNames: ['Surname', 'Forename'],
colModel: [
{ name: 'Surname', index: 'Surname', width: 200, align: 'left' },
{ name: 'Forename', index: 'Forename', width: 200, align: 'left'}],
pager: jQuery('#pager'),
rowNum: 10,
rowList: [5, 10, 20, 50],
sortname: 'Id',
sortorder: "desc",
viewrecords: true,
imgpath: '/scripts/themes/coffee/images',
caption: 'My first grid'
});
它击中了我的动作,但网格在加载时卡住了,你知道我做错了什么吗??