Method "saveRow" when url is "clientArray",errorfunc or successfunc never fire
hp3423 opened this issue · comments
Code like this:
$("#grid").jqGrid('saveRow', rowid,{ url:"clientArray", successfunc:function(response){ console.log("successfunc"); }, errorfunc:function(rowid, response, satus){ console.log("errorfunc "); }, aftersavefunc:function(rowid, response, options){ console.log("aftersavefunc"); } });
when use "editrules" verification failed,can I do something else
$("#jqGrid").jqGrid({
editurl: 'clientArray',
...
colModel: [
{
label: "price",
name: 'price',
width: 140,
editrules: {
"number":true
},
editable: true
}
],
....
});
$("#btnSave").click(function(){
$("#jqGrid").jqGrid("saveRow",rowid,{
validationCell:function(elem, error, iRow, iCol){
console.log(error);
}
});
});
when cell "price" input is not as number,and press the save button,the will open a alert,but not action the validationCell .
Could you give me an example? Thank you
The validateCell is a grid option and not a part of saveRow. Put this in grid option. Please read the docs carefully it is described at the top of the provided link.
Thank you for your patience.
My English is not very good and I find it difficult to read the documents.
This problem has been resolved.