jqgrid - The parameter of serializeDelData callback contains id field only -
i use jggrid 4.5.4. when user presses delete
button, need send 2 pieces of information server: record id, , record version (for optimistic locking). know serializedeldata
callback can used purpose:
serializedeldata:serializedeldatacallback ... function serializedeldatacallback(data) { // "data" argument has "id" , "oper" fields only! can other fields of current grid row? ... return $.param(modifieddata); }
however, argument of serializedeldata
callback contains id
, oper
fields only. use similar callback posting new , updated records - callback provides fields of current row.
where can other fields of current grid row in serializedeldata
callback? (i need row version hidden field in grid.)
if use optimistic locking rows of grid contains record version column. easy way onclicksubmit
callback (see the documentation) example in following form
onclicksubmit: function (options, rowid) { return { rowver: $(this).jqgrid("getcell", rowid, "rowversion") }; }
in above code suppose have column name rowversion
hold record version need send rowver
param. in general can use getcell
in same way inside of serializedeldata
, onclicksubmit
seems me more simple. returned properties of onclicksubmit
combined standard parameters used delete, should have information need.
Comments
Post a Comment