jqgrid の onclickonPgButtons にデータを保存する必要があり、データを保存した後、次/前の行に移動する必要があります。以下の関数は、編集フォームの OnClickPgButton 関数に記述されています。
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();
}
}
}
私の問題は、データを保存した後、編集フォームで次/前の行を表示する必要があることです。
前もって感謝します..