Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_Related Related Topics sp_TopicIcon
Order of grid events?
17/05/2010
17:40
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Is there an exact description of the order of the grid callback events?

I assumed the following order:

  1. beforeRequest
  2. loadBeforeSend
  3. serializeGridData
  4. loadComplete / loadError
  5. 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

17/05/2010
19:31
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

18/05/2010
00:28
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

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)

18/05/2010
12:34
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

20/05/2010
10:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

20/05/2010
10:47
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Thank you.

It's no problem which event is called first, but I need a SPEC with the order of the events I can rely on.

Please describe the exact order of all callback events in the documentation (Wiki - Events-page).

Kind regards,
Klaus.

20/05/2010
17:48
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Done. I have add this into the docs.

http://www.trirand.com/jqgridw.....tion_order

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.

25/05/2010
16:44
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
36 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information