我需要在jqgrid和保存数据后保存onclickonPgButtons上的数据它需要转到下一个/上一行.Below函数写入OnClickPgButton编辑窗体函数。如何停止从重新加载JqGrid
jQuery("#table").jqGrid('navGrid', '#pager', { search: false, refresh: false, del: false, add: false, cloneToTop: true }, { height: editFormheight, width: editFormwidth, reloadAfterSubmit: true, closeAfterEdit: true, recreateForm: true, cloneToTop: true,
onclickPgButtons: function (whichbutton, formid, rowid) { ModificationDataSave(whichbutton, formid, rowid); $("#edithdtable").stop(); }
});
function ModificationDataSave(whichbutton, formid, rowid) {
if ($("#" + $("#PId").val()).closest("td").text().trim() != $("#Name").val()) {
if (confirm('There is some unsaved data. Would you like to save?')) {
$("#sData").trigger("click");
}
else {
$("#edithdtable").stop();
}
}
}
我的问题是保存数据后,我需要显示editform的下一个/上一行。
在此先感谢..
你能指定你的问题吗?你的html是什么样的,在哪里调用的函数,...尝试添加一个[jsfiddle](http://jsfiddle.net/) –
将数据保存到数据库后..然后我需要显示编辑表单在我的页面上.. @Hans Vn – Ksnrg
也许你可以创建表单,但不要让它显示(使用css:display:none;)。显示它,当你需要它$(“#form#)。show(); –