如果发现 jqgrid 在运行中出现次错误,可能是以下原因
$('#@(ViewBag.tabcid + "_grid")').jqGrid('navGrid', '#@(ViewBag.tabcid + "_page")', {//options view: false, del: ('@ViewBag.type' != null && '@ViewBag.type' == "1") == true, add: false, edit: false, search: false, refresh: true }, {//edit options }, { // add options }, {//del options reloadAfterSubmit: true, closeOnEscape: true// , url: '@Url.Action("Delete")' , beforeShowForm: function (form) { } , afterComplete: function () { //jQuery("#shipFactorList_d").jqGrid('clearGridData', true); //jQuery("#shipFactorList_d2").jqGrid('clearGridData', true); } , afterSubmit: function (response, formid) { var data = JSON.parse(response.responseText); if (data.status) { return [true, "OK", data.id]; } else { return [false, data.errmsg]; } } }, { },// search options { } //view options );
以上可以看到 options 中定义的按钮 应该 对应到每一个大括号