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>
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
April 9,