jqgrid aftersavefunc没有开火(jqgrid aftersavefunc not firing)
我正在使用jqgrid 4.8 JavaScript,我正在使用内联编辑和clientArray。 现在,我想更改单元格中的值并保存行,因此代码为:
$("#jqGrid").jqGrid('setCell', rowId, 'comments', 'test'); var saveparameters = { "successfunc": null, "url": 'clientArray', "aftersavefunc": function (rowid, response, options) { alert('b'); }, "extraparam": {}, "errorfunc": null, "afterrestorefunc": null, "restoreAfterError": true, "mtype": "POST" }; $("#jqGrid").jqGrid('saveRow', rowId, saveparameters);......但警报永远不会发生。 我究竟做错了什么?
I'm using jqgrid 4.8 JavaScript, I'm using inline edit and clientArray. Now, I want to change value in a cell and save row, so the code is:
$("#jqGrid").jqGrid('setCell', rowId, 'comments', 'test'); var saveparameters = { "successfunc": null, "url": 'clientArray', "aftersavefunc": function (rowid, response, options) { alert('b'); }, "extraparam": {}, "errorfunc": null, "afterrestorefunc": null, "restoreAfterError": true, "mtype": "POST" }; $("#jqGrid").jqGrid('saveRow', rowId, saveparameters);...but the alert never fires. What am I doing wrong?
最满意答案
这只会在您致电时触发:
$('#jqGrid').jqGrid('editRow', rowId, false);参考:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#saverow
this will only fire if you call:
$('#jqGrid').jqGrid('editRow', rowId, false);Reference:
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:inline_editing#saverow
更多推荐
发布评论