3

我有一些这样的活动:

$('#grid').jqGrid('saveRow', lastsel, 
    { aftersavefunc: function (rowid, response) { alert('after save'); },
    errorfunc: function (rowid, response) { alert('error occured'); } 
});

问题是,他们从不开火!

编辑 2

将答案移至实际答案,而不是将其包含在问题中。

4

1 回答 1

3

好了,问题解决了。您还必须将事件参数添加到“editRow”调用中。它们在保存时使用......真是令人困惑!

$('#grid').jqGrid('editRow', id, { keys: true,  
    aftersavefunc: function (rowid, response) { alert('after save'); }, 
    errorfunc: function (rowid, response) { alert('...we have a problem'); }  
}); 
于 2012-04-19T05:35:19.877 回答