1

我正在使用jqgrid进行内联编辑。

以下是启用网格的最后一行以对其进行编辑和添加参数的代码片段。

gridComplete: function ()
{
    var lastrowid = jQuery("#list10").jqGrid('getGridParam', 'reccount');
    var se = "<input type='button' value='Save' onclick=\"jQuery('#list10').saveRow('"+lastrowid+"');\" />"; 
    var parameters = {
            height: 30,
            act:se,
            keys : false,
            restoreAfterError : false,
            mtype : "POST",
            editParams:{
                successfunc:function(response) {
                alert("success");
                FLAG = true;
                return true;
                }
            },
            errorfunc: function(rowid, res) {
                $.jgrid.info_dialog($.jgrid.errors.errcap, res.responseText , $.jgrid.edit.bClose, {top:400,left:565});
            }
    };
    jQuery("#list10").jqGrid('editRow',lastrowid,parameters);
    jQuery("#list10").setSelection(lastrowid);
    $('#list10 tr:last').focus();
    jQuery("#list10").jqGrid('setRowData',lastrowid, parameters);
    jQuery("#list10").trigger('reloadGrid');            
},

我想触发successfunc设置标志,所以我在那里写了代码,但它没有执行(不显示警报),那么代码有什么问题吗?

任何帮助将不胜感激。

4

0 回答 0