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_TopicIcon
jqgrid default loaderror handler : is it possible?
21/07/2009
16:56
Avatar
rekna1
Member
Members
Forum Posts: 9
Member Since:
21/07/2009
sp_UserOfflineSmall Offline

Hi, I would like to specify a default loaderror handler (or other default handlers) for all my
jqgrids...

1. is this possible with $.extend($.jgrid.defaults...)?
2. how can I get a reference to the grid in a generic way in my default loaderror
handler?

22/07/2009
01:38
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1. Yes the $.extend($.jgrid.defaults…) is correct and you can put any valid jqGrid parameter here to be se as default.

2. To the loadError we pass the request, status, and error, but not reference to the grid. Also you can do this in the request if you can simulate this.

Reagrds

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.

02/08/2009
03:34
Avatar
rekna1
Member
Members
Forum Posts: 9
Member Since:
21/07/2009
sp_UserOfflineSmall Offline

It would be very usefull if one could get a reference to the grid in all event handlers. Because that would allow to write default handlers for all grids in an application. Now I have to include them on every page for every grid over and over again...

04/08/2009
02:11
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. Will think about this.

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.

10/11/2009
18:03
Avatar
rekna1
Member
Members
Forum Posts: 9
Member Since:
21/07/2009
sp_UserOfflineSmall Offline

Currently still using 3.5, when debugging with firebug I saw that the this pointer inside at least gridcomplete and selrow is a reference to jqgrid… is this true in all other events, because if this is true, it basically solves the problem, the this pointer allows you to access all jqrid properties and methods!

update... does not seem to be the jquery object. It seems this is the internal jqgrid configuration object that is exposed here???

11/11/2009
03:52
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There are new concept (should document it).

In 3.6 version - every grid event is related to this: Example

gridComplete : function () {

// this - point to the grid, so

$(this).jqGrid('getGridParam','url');

// will return the url of the grid

}

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
62 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