Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by john on May 08, 2008 06:53
open dhtmlx forum
setPagingWTMode and selecting all checkboxes pagination problem

I have a strange behavior with the following code:

...................
mygrid.setPagingWTMode(true,true,true,false,["Risultati","Records da "," a ","Pag. "," Righe per pag."]);
mygrid.enablePagingWT(true,12,0,"recinfoArea");
......................

..........................
function selectAll()
{
mygrid.forEachRow(function(id){
mygrid.cells(id,1).setValue(1);
});
}
..........................

as soon the page is loaded if I call selectAll function it sets only the first paging page.... to let select all check boxes of all pages I need to see all pages first and then call selectAll.

How can I let the selectAll function select all check boxes in paginations....


Answer posted by Support on May 08, 2008 10:04
>>How can I let the selectAll function select all check boxes in paginations....
The API access only rows which are already rendered , you can force rendering of all rows in a buffer, but it will have negative effect on performance

function selectAll()
{
    while (mygrid.addRowsFromBuffer());   // load from buffer
    mygrid.forEachRow(function(id){
        mygrid.cells(id,1).setValue(1);
    });
}