I obviously need to refresh the grid from the server after I create/edit/delete a row. I have checked all of Oleg\'s aswers regarding the reload and I still can\'t make it
It seems that the parameters were given wrong. The correct pager params would be:
.navGrid('#pager',
{edit:true,
add: true,
del:true,refresh:false},
{ // edit options
beforeShowForm: function(frm) {
comptes.jqGrid('setColProp', 'password', {editrules: {required: false}});
},
afterSubmit: function() {
comptes.jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid');
return [true,'',false]; // no error and no new rowid
}
},
{ // add options
beforeShowForm: function(frm) {
comptes.jqGrid('setColProp', 'password', {editrules: {required: true}});
},
afterSubmit: function() {
comptes.jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid');
return [true,'']; // no error
}
} ,
{ // delete options
afterSubmit: function() {
comptes.jqGrid('setGridParam',{datatype:'json'}).trigger('reloadGrid');
return [true,'']; // no error
}
}
);