JqGrid events do not fire after saving

I have several events configured like this:

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

The problem is that they never work!

Edit 2

Moved response to acutal answer instead of having it in question.

+3
source share
1 answer

Ok, the problem is resolved. You must also add event parameters to the editRow call. They are used when saving ... really confused!

$('#grid').jqGrid('editRow', id, { keys: true,  
    aftersavefunc: function (rowid, response) { alert('after save'); }, 
    errorfunc: function (rowid, response) { alert('...we have a problem'); }  
}); 
+2
source

All Articles