:: Forum >>

Performance of grid is real slow if we have more column

Can some one pls. help.
Our req. need 400 rows with 72 columns. When we tried with this grid it is too slow.

We are doing like below..

<script>

var myCells = <%= data %>;

var myHeaders = <%= headers %>;
var colCount=<%= colCount-2%>;
var recCount=<%= recCount %>;
// create grid object
var obj = new AW.Grid.Extended;

// assign cells and headers text
obj.setCellText(myCells);
obj.setHeaderText(myHeaders);

// set number of columns/rows
obj.setColumnCount(colCount);
obj.setRowCount(recCount);
obj.setSize(setwidth(),500);
function setwidth()
{
if(colCount>0){
for(var count=1;count<=colCount;count++){
if(count==colCount){
return 105*count;
}
}
}else{
return 0;
}
}
var secCol = 0;
for (var r=0;r<recCount;r++) {
secCol = colCount;
for (var c=0;c<colCount;c++) {
//setCellSecurity(c,r,obj.getCellText(secCol, r));
secCol++;
}

}

// This Function is used set the Column Level Security

function setCellSecurity(colVal,rowVal,secInd) {

if (secInd=='V') {
obj.setCellEditable(false,colVal,rowVal);
obj.getCellTemplate(colVal,rowVal).setStyle("background", "#e6e6e6");
} else if(secInd=='C') {
obj.setCellEditable(true,colVal,rowVal);
obj.getCellTemplate(colVal,rowVal).setStyle("background", "#FFFFCC");
}
}

// write grid to the page
document.write(obj);
</script>
AG
Wednesday, April 9, 2008
Which version are you using (2.0 or 2.5)? - AW 2.5 should be much faster and does not really depend that much on the number of columns (only visible columns are rendered).

Do you have the bad performance with or without setCellSecurity calls - it is commented out in the posted code?
Alex (ActiveWidgets)
Thursday, April 10, 2008

This topic is archived.


Back to support forum

Forum search