为什么我的 JQ 网格第一行或者我们可以告诉第 0 行是这样增加的?为什么喜欢这样..请在下面找到我的代码。
function bindGrid(jsondata)
{
jQuery("#list1").jqGrid(
{
//datatype: "json",
datatype: "jsonstring",
datastr: jsondata,
colNames: ['username', 'email'],
colModel: [
{
name: 'username',
index: 'username',
width: 100,
classes: 'pointer'
},
{
name: 'email',
index: 'email',
width: 250,
classes: 'pointer',
editable:true,
"editrules":{"required":true,"email":true}
}
],
//rowNum:10000,
sortorder: "asc",
caption: "Email Configuration",
gridview: true,
loadui: "block",
rownumbers: true, //Displays Row number Column
'cellEdit': true,
'cellsubmit' : 'clientArray'
,editurl: 'clientArray'
,afterSaveCell: function(rowid, cellname, value, iRow, iCol)
{debugger;
var username =$('#list1').jqGrid ('getCell', rowid, 'username');
var email =value;
UpdateEmailInDataBase(username,email);
},
shrinkToFit:true,
height: "100%",
rowNum:10,
rowList:[5,10,20],
pager: '#pager',
ignoreCase:true,
viewrecords: true
}).jqGrid('navGrid','#pager',{add:false,edit:false,del:false});