Hi,
I am running into some problem… It is taking too much time to add rows to the grid.
Following is a code sample where I add 360 rows but it is taking more than 90 seconds.
Why is it so slow?
//initlializing grid with empty rows
function initSchedule() {
sgTrans.clearAll();
for (i = 1; i < 360; i++) {
myrow = new Array(i, “”,"", “”, “”,"","","");
sgTrans.addRow(i, myrow);
}
return true;
}
Thanks,
Biju
Adding rows one by one is slowest way to fill the grid with data
You can
a) use grid.parse and js array of data to load all rows at once
or
b) use dhtmlxgrid_fast.js as
sgTrans.startFastOperations();
for (i = 1; i < 360; i++) {
myrow = new Array(i, “”,"", “”, “”,"","","");
sgTrans.addRow(i, myrow);
}
sgTrans.stopFastOperations();