Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Aliaksei on May 05, 2008 09:06
open dhtmlx forum
DHTMLX Grid Problem with

I have encountered a very strange and rare problem - and appears in Internet Explorer only.
From time to time the last row in a grid is not being rendered and IE gives me an error: Invalid argument.
I've tried to debug it, and it leads to dhtmlxgrid_srnd.js , where the function tries to assign negative value ( as a row height ? ) .
I can send you a printscreen of the debugger window.

/**
* @desc: change height of fake row
* @type: private
*/
dhtmlXGridObject.prototype._fixHeight=function(z,delta){
var x=parseFloat(z.style.height||this._srdh)-delta;
if (x==this._srdh) { z._sRow=false; z._rLoad=true; }

z.style.height=x+"px"; // <----- x is negative here, produces an error !!!!
var n=z.childNodes.length;
for (var i=0; i<n; i++)
z.childNodes[i].style.height=x+"px";
}
Answer posted by Support on May 08, 2008 02:55
The problem confirmed and fixed, fix will be available as part of next grid's version.
As fast solution you can update code in next way
    var x=Math.max(0,parseFloat(z.style.height||this._srdh)-delta);
Answer posted by Support on May 08, 2008 02:57
Also, if you are using dynamic smart rendering please check the value which you set as maximum count of rows ( from js code or by rows@total_count ) , the mentioned error may be a symptom of situation when count of rows loaded from server differs from defined maximum limit.