Intercept The Cellsubmit Jqgrid
I'm trying to intercept the cellSubmit for a specific cell in jqGrid. I would like to override it in such a way that It allows me to handle my own submit using custom code. But I
Solution 1:
You can implement your requirements in different way. If you just need to send custom data or custom serialized data in some cases it would be enough to use serializeCellData
callback. Probably beforeSaveCell
, beforeSubmitCell
or afterSaveCell
can be also helpful.
Alternatively you can "subclass" saveCell
function (see the answer, this one or another one as examples). The corresponding code could be like the following
var orgSaveCell = $.fn.jqGrid.saveCell;
$.jgrid.extend({
saveCell: function (iRow, iCol) {
var res;
// make some tests and do your own implementation of saveCell// or call the original one
res = orgSaveCell.call (this, iRow, iCol);
// As one more option you can do some modification or do// additional actions before calling of original saveCell// or after itreturn res;
}
});
Post a Comment for "Intercept The Cellsubmit Jqgrid"