Forum


22:03

04/01/2013

I am a bit confused. I hooked the loadError event on my grid. However, it is fired when I am setting it via 'setGridParam'.
I would have expected the preload events to fire but they do not.
If I do a relaodgrid, all the "pre" events fire. IE "serializeGridData", "beforeRequest", "beforeProcessing", "loadBeforeSend".
In summary, when I call 'setGridParam' no events fire except for loadError.
If I do a "reloadGrid" all the pre events fire and the grid loads successfully.
So what is causing loadError to fire and how do I ignore it when it's not a result of a service call?
grid.jqGrid('setGridParam', { url: svc.getWebAPIUrl('Incident', 'GetIncidents'), datatype: 'json', serializeGridData: function (pdata) { debugger; var s = (pdata.page - 1) * pdata.rows; var e = pdata.rows; return 'csId=' + pdata.CSID + '&folderid=' + pdata.folderId + '&uId=0&s='+ s + '&e=' + e; }, beforeProcessing: function (data, status, jqXHR) { debugger; }, beforeRequest: function () { debugger; }, loadBeforeSend: function (xhr, settings) { debugger; }, loadComplete: function () { alert('OK'); }, loadError: function (jqXHR, textStatus, errorThrown) { //debugger; alert(util.getErrorMessage({jqXHR: jqXHR, textStatus: textStatus})); } });
Most Users Ever Online: 715
Currently Online:
87 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66