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
$t.p is undefined
21/12/2009
14:06
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline
I'm often getting the JavaScript error message “$t.p is undefined” located in the setGridWidth method.
setGridWidth : function(nwidth, shrink) {
    return this.each(function(){
      var $t = this, cw, initwidth = 0, brd=$t.p.cellLayout, lvc, vc=0, hs=false, scw=$t.p.scrollOffset, aw, gw=0, tw=0, cl = 0, cr;
       …
I think the setGridWidth is called in a very early or late lifetime phase of the grid object when triggered via resize-events. Maybe not all data is loaded at this time or already destroyed. (maybe setGridHeight has the same issue)
Is it possible to catch those problems or to check if the main grid components are available before accessing them?
It doesn't seem to be a big problem, but the debugger always stops with this annoying error.
(working with jqGrid Version 3.6.2)
22/12/2009
09:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

In some situations I have the same problem - my solution is to use setGridWidth within setTimeout.

Best 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.

23/12/2009
09:56
Avatar
Klaus
Member
Members
Forum Posts: 68
Member Since:
18/11/2009
sp_UserOfflineSmall Offline

Thank you.

That seems to fix some problems.

Another problem that sometimes occurs in my web app is the following ...
... when a grid instance is already destroyed (because of a view change) at the time when an outstanding ajax-call (loading new data) completes (loading the received data into the grid) this throws an error because it can't fill the grid which was already destroyed.

I know I should prevent such situations (to destroy the grid befor all open tasks and ajax-calls are finished) but how do I know if any asyc action is still in progress?

The bad thing with JavaScript errors is, that the whole webapp crashes.

Nevertheless I like your grid control plugin. Cool and highly customizable solution. Cool

Kind regards,
Klaus.

26/12/2009
11:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Maybe you can define ajaxStart event in ajaxGridOptions and then you will know that there is ajax available

Best 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:
83 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