:: Forum >>

Row Count is 0

I'm setting grid height based on the number of rows. The problem is that the number of rows turns out to be zero. The data is in an XML file so I'm thinking somehow the data isn't loaded yet or something?!?

anyways....

I have :
var hgt=obj.getRowCount()*60;
    hgt += 45;
    if(hgt>530)
        hgt=530;
    obj.setStyle("height", hgt + "px");



...the row height always turns out to be just 45px. Any way to get around this?
BenS
Tuesday, March 21, 2006
Yes, until the data is loaded (asynchronously by default) the row count should be 0.
Alex (ActiveWidgets)
Tuesday, March 21, 2006
How will i get around this??
Ben
Wednesday, March 22, 2006
Thanks Alex,

Solution for anyone interested:

var defaultResponse = table.response;
table.response = function(xml){
defaultResponse.call(this, xml);

//*set grid height
    hgt=table.getCount()*60;
    hgt += 45;
    if(hgt>530)
        hgt=530;
    obj.setStyle("height", hgt + "px");
}


Ben
Wednesday, March 22, 2006

This topic is archived.


Back to support forum

Forum search