jquery - jqGrid raises Load Error before receiving data -
i've got jqgrid working fine, i'm attempting stop loading data on page load. followed other instructions of setting datatype 'local', creating grid, , using setgridparam afterwards. however, after change grid parameters , call reloadgrid, 'load error' though no call ever hit server.
function set_grid_params(){ $("#current").setgridparam({postdata:{emp:function(){return $("#employee").val();}}}); $("#current").setgridparam({edit_url: #the api url}); $("#current").setgridparam({mtype:'get', datatype:'json'}); $("#current").trigger('reloadgrid'); } #in main method $("#current").jqgrid({ name: "current balances", colnames: ["a","b","c"], colmodel: [unimportant], datatype: 'local' }); #do other stuff set $("#employee"). blank @ page load, # why need stop initial load, postdata empty. set_grid_params();
the dialog pops says:
load error
-type: parsererror
-response: 200
-ok
i never stop @ breakpoints in api method, , server logs don't show requests hit url. missing?
your example sets edit_url
parameter. want set url
parameter instead? way can use 1 call of setgridparam
set properties need set @ once instead of calling method 3 times.
Comments
Post a Comment