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 ?


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.