views:

8

answers:

1

When I'm attempting to switch between filters and loading up different jqGrids in succession, I sometimes get this error in FF:

i.p is undefined (line 108), which is this line:

j.p.lastsort=b.inArray(j.p.lastsort,f);if(j.p.treeGrid)j.p.expColInd=b.inArray(j.p.expColInd,f)},setGridWidth:function(f,k){return this.each(function(){var i=this,h,g=0,j=i.p.cellLayout,m,a=0,q=false,t=i.p.scrollOffset,x,C=0,K=0,J=0,F;if(i.grid){if(typeof k!="boolean")k=i.p.shrinkToFit;if(!isNaN(f)){f=parseInt(f,10);i.grid.width=i.p.width=f;b("#gbox_"+i.p.id).css("width",f+"px");b("#gview_"+i.p.id).css("width",f+"px");b(i.grid.bDiv).css("width",f+"px");b(i.grid.hDiv).css("width",f+"px");i.p.pager&&

Any clues on how to avoid this? It is a difficult to replicate bug cos I really have to switch quickly between the filters to sometimes get this error.

A: 

Found the problem which was a function that was called on grid complete to setGridWidth. Somehow even though the grid was 'complete', the setGridWidth couldn't get the grid to adjust .. maybe because of the delay it takes for the grid to render after ajax complete/success.

A bit of background: I use the jqGrid set width function after grid complete to determine whether horizontal scrollers are needed. (A lot of customisation there...)

Brandon