I cu开发者_StackOverflow社区rrently have a jqGrid that edits data in the database using editurl. How do I do actions after receiving a reply from the server, for example check if the updated succeeded, or a message returned by the server.
if there's no jqGrid function that does this, how then can I go about doing this?
The OP wrote:
solved. API for edit row is as below.
jQuery("#grid_id").jqGrid('editRow',rowid, keys, oneditfunc, succesfunc, url, extraparam, aftersavefunc,errorfunc, afterrestorefunc);
Put the function you want under
aftersavefunc
, and take in 2 params, the row_id and the response. the response is aXMLhttpRequest
Object.
精彩评论