$("#list_records").jqGrid({
url: "getGridData.php",
datatype: "json",
mtype: "GET",
colNames: ["UserId", "Mobile Number"],
colModel: [
{ name: "id",align:"right"},
{ name: "mobilenumber"}
],
pager: "#perpage",
rowNum: 10,
rowList: [10,20],
sortname: "id",
sortorder: "asc",
height: 'auto',
viewrecords: true,
gridview: true,
// editurl: 'getGridData.php'
caption: ""
});
jQuery("#list_records").jqGrid('navGrid','#perpage',{edit:true,add:true,del:true});
它的工作正常,当我点击一个添加按钮时,将会打开这样的。如何在此表单中添加文本框。当我添加编辑网址时,工作页面将显示为空白页面..
答案 0 :(得分:0)
您应该在要editable: true
的所有列中添加属性colModel
,您希望对其进行编辑。例如,您可以使用
colModel: [
{ name: "id", align:"right" },
{ name: "mobilenumber", editable: true }
]