Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by David on Dec 01, 2008 08:32
open dhtmlx forum
checkall with paging

Hello,
I would like checkall box in dhtmlgrid. For this i have try this code :
function checkallgrid(grid,col)
{
    grid.forEachRow(function(id){
grid.cells(id,col).setValue(1);
    });    
}

I have also try master_checkbox but i found the same problem :
It checked only page loaded. If i have 5 pages, i click on page 1 and after page 3, page 2 will be not checked

So how checkall on all pages ?
Answer posted by Support on Dec 02, 2008 01:53

You can use 

for (var i=0; i<grid.getRowsNum(); i++) //loop through all records in grid. 
   grid.cells2(i,col).setValue(1);

Beware that to set value, row  need to be rendered first, which can take significent time for big datasets.