Forum



17:40

18/11/2009

Is there an exact description of the order of the grid callback events?
I assumed the following order:
- beforeRequest
- loadBeforeSend
- serializeGridData
- loadComplete / loadError
- gridComplete
BUT after adding debugging statements into my code I discovered the following behaviour
... that gridComplete is fired before loadComplete ... is this correct? why?
I thought that loadComplete is directly called after the XHR returned and gridComplete is the last event called (after rendering the grid)
Please tell me the order of the events I can rely on
19:31

Moderators
30/10/2007

Hello,
Are you using in this case scroll:1 ?
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
00:28

18/11/2009

no, I'm using normal paging (and jqGrid 3.6.5).
why? does the event order differ?
I need these callbacks to separate the network time and the rendering time the grid uses, so the order is very important (1 event before the request is sent to the server, 1 event after the response from the server and the last event after rendering is done)
12:34

Moderators
30/10/2007

Hello Klaus,
Just checked this. You are right.
Never mind. Seems that the behaviour changes, when we add some stuffs for scroll :1.
Let me think what to do.
Thanks again.
Best Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
10:40

Moderators
30/10/2007

Hello Klaus,
We will stay as it is in the moment. I will change only the code for datatype xmlstring and jsonstring so the the order will be the same in all datatypes.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
17:48

Moderators
30/10/2007

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
16:44

18/11/2009

Hello Tony!
I've just added a new callback event ("ajaxComplete") to the grid which helps me with some performance measuring.
@populate = function ...
$.ajax(...
success: function(req,st) {
+ if($.isFunction(ts.p.ajaxComplete)) { ts.p.ajaxComplete.call(ts,req,st); }
...
(+ added ajaxComplete: null to global param init)
This event (ajaxComplete) should be called directly after the AJAX response returned from the server (as the loadComplete function might be intended to be initially).
Maybe you could integrate this to the base code - would be useful for several purposes.
With this new event I measured the loading times and discovered the following:
- the data loading (addJSONData) is much more time-consuming - time between ajaxComplete and gridComplete
- about 100-200ms for a table with 20 rows and 30 cols (loading from server as JSON-data)
- could this be improved (I already use gridview:true option)?
- than the rendering of the data - time between gridComplete and loadComplete
- about 50ms (same table)
Could you also update the event descriptions on the wiki page (gridComplete and loadComplete are not really invoked the way they are described - as described in new event order)
Kind regards,
Klaus.
Most Users Ever Online: 715
Currently Online:
57 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