如何在JqGrid内联编辑中处理来自MVC控制器的错误

时间:2022-10-18 19:15:27
     onSelectRow: function(id) {
                         if (id && id !== lastsel<%= count %>) {
                             $j(gridName).restoreRow(lastsel<%= count %>);                               
                             $j(gridName).editRow(id, true);                                 
                             lastsel<%= count %> = id;
                         }                       
                     }

How do I handle the error thrown from MVC controller function to the Jqgrid inline edit.

如何处理从MVC控制器函数抛出到Jqgrid内联编辑的错误。

    Function Edit(ByVal collection As FormCollection) As ActionResult
       Return Content("false")
    End Function

The document says saveRow (rowid, succesfunc, url, extraparam, aftersavefunc, onerrorfunc) . How do I call the onSuccessHandler and onError Handler.

文档说saveRow(rowid,succesfunc,url,extraparam,aftersavefunc,onerrorfunc)。如何调用onSuccessHandler和onError Handler。

Will pareciate if someone can provide a dummy code.

如果有人可以提供虚拟代码,那么会很糟糕吗。

1 个解决方案

#1


1  

saveRow (rowid, onSuccessHandler , url, extraparam, aftersavefunc, onErrorHandler);

onSuccessHandler = function(data) {
}

onErrorHandler = function(data) {
}

#1


1  

saveRow (rowid, onSuccessHandler , url, extraparam, aftersavefunc, onErrorHandler);

onSuccessHandler = function(data) {
}

onErrorHandler = function(data) {
}