performance problem when using grid with checkbox
Hello, I am using the grid with checkbox. And I put a checkbox on the head to select all rows.
Usually it need 10s and 100% cpu to select all rows when the grid have 4000 rows which can not be accepted. And I have keep virtual mode on .
The code is as following. Is there any way to improve the performance?
Usually it need 10s and 100% cpu to select all rows when the grid have 4000 rows which can not be accepted. And I have keep virtual mode on .
The code is as following. Is there any way to improve the performance?
obj.checkboxSellAll.onControlValueChanged = function(value){
var obj=null;
obj= eval($("currentGridName").value);
if(value){
var rows_array = new Array();
for(var i=0;i<obj.tabGrid.getRowCount();i++){
if (obj.tabGrid.getCellText(obj.idColIndex,i)!=''){
rows_array[i]=i;
}
}
obj.tabGrid.setSelectedRows(rows_array);
}else{
obj.tabGrid.setSelectedRows([]);
}
}
Joseph
September 7,