Organizational Research By

Surprising Reserch Topic

Question:How do I access JQgrid ajax return data on every grid reload with a custom function?


I have overloaded the jqGrid data structure that is returned via the AJAX call to contain extra information I need for my web app on each grid reload.

Every time the grid is loaded/reloaded, I want to be able to access that data and do some manipulation to other DOM elements outside the jqgrid via a function.

I have tried succes/afterSubmit and I don't think they are what I want, because they don't seem to have access to the json returned.

asked Sep 13, 2013 in jquery by anonymous
edited Sep 12, 2013
0 votes
153 views



Related Hot Questions

2 Answers

0 votes
You can access the data inside of loadComplete or beforeProcessing callback. The fist parameter represent the data returned from the server in exactly the same form as it was on the server. Inside of beforeProcessing callback you can even modify the data in any way.

One more good place for extra information is userdata part of the server response (see the documentation). Additional userdata property must be object. The main advantage of the usage of userdata is saving of the value of userdata inside of userData internal parameter of jqGrid. So you can use getGridParam to access the data.
answered Sep 13, 2013 by anonymous
edited Sep 12, 2013
0 votes
You can access the data inside of loadComplete or beforeProcessing callback. The fist parameter represent the data returned from the server in exactly the same form as it was on the server. Inside of beforeProcessing callback you can even modify the data in any way.

One more good place for extra information is userdata part of the server response (see the documentation). Additional userdata property must be object. The main advantage of the usage of userdata is saving of the value of userdata inside of userData internal parameter of jqGrid. So you can use getGridParam to access the data.
answered Sep 13, 2013 by anonymous
edited Sep 12, 2013

...