3.2.0

Invalid Argument in onScrollHeightChanged

Hey all,
I have been using ActiveWidgets for this Struts project, but have not seen an error like this before. I am sure it is me doing something stupid.
When the grid loads, I get a javascript error that says "Invalid Argument".
If I trace it back, It brings me to this line:
var e = this.getScrollTemplate().element();

in this function:
onScrollHeightChanged:function(h)
 	{
 		var e = this.getScrollTemplate().element();
 		if(e)
 		{
 			e.firstChild.firstChild.style.height = h + "px";
 			if(AW.ie)
 			{
 				e.firstChild.className += "" 
 			}
 		}
 	}

in
AW.Grid.Controllers.Overflow

in aw.js.

Any idea where this is called from/why I am getting this error?
Justin
July 23,
This might happen if h argument is not a valid number (or is negative). In this case

e.firstChild.firstChild.style.height = h + "px";

will fail with this error. I suspect the negative value for h but I don't know why it happens.
Alex (ActiveWidgets)
July 24,
When is this method called? Perhaps I am invoking it before the height is initialized?
Justin
July 24,
I have 2 grid son the same page...would that affect it at all?
Justin
July 24,
onScrollHeightChanged event handler fires whenever setScrollHeight() method is called. It is called internally from adjustScrollHeight method (during initialization or when changing row height etc.).
Alex (ActiveWidgets)
July 24,
I tried debugging it, and it says that the value of 'h' is 'NaN'. Any thoughts?
Justin
July 25,
I guess what I don't understand is why this is happening on this page and not my others, when I don't even know what I am doing to make this variable Not a Number.
Justin
July 25,
Dammit. If I told you I was being an idiot, would you believe it?

Note to self: Set row count to DATA.length not GRID.length!
Justin
July 26,

This topic is archived.

See also:


Back to support forum