【问题标题】:jqgrid aftersavefunc not called on SaveRow未在 SaveRow 上调用 jqgrid aftersavefunc
【发布时间】:2012-09-04 05:57:20
【问题描述】:

我正在使用jqGrid的onSelectRow方法并调用aftersavefunc但是当成功保存行时这个函数没有执行,我们正在使用clientarray来保存数据。

在 jqgrid 文档中写到它也可以与 clientarray 一起使用。

使用的代码如下:-

onSelectRow: function (id) {
            $('#grdTasks').jqGrid('saveRow', lastsel, true, 'clientArray', false, 
             { aftersavefunc: function () 
             {
                alert('saved');
             }
            })

【问题讨论】:

    标签: jquery asp.net-mvc-3 jqgrid


    【解决方案1】:

    尝试用object设置参数:

    saveparameters = {
        "successfunc" : null,
        "url" : 'clientArray',
        "extraparam" : {},
        "aftersavefunc" : function( response ) {
                              alert('saved');
                          },
        "errorfunc": null,
        "afterrestorefunc" : null,
        "restoreAfterError" : true,
        "mtype" : "POST"
    }
    
    $('#grdTasks').jqGrid('saveRow', rowid, saveparameters );
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多