Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

ListGrid select with more than 10000 rows (without progressive loading)

$
0
0
We have a ListGrid that loads data of around 20k records.
Each row a checkbox on the first column of the row.

We also have a checkbox item on top of the grid which is named
Select All.

Now when i select Select All checkbox we make sure all the check boxes in the individual rows (20K+) are checked by using the following code.
Code:

private void selectGridRows(boolean select){
                for(int i=0; i < grid.getTotalRows(); i++){
                        if(grid.getEditedRecord(i).getAttribute(gridDataSource.someColumn) == null){
                                if(select){
                                        grid.selectRecord(i);
                                }else{
                                        grid.deselectRecord(i);
                                }
                                grid.setEditValue(i, 0, select);
                                grid.refreshRow(i);
                        }
                }
}

However this seems not working because we are progressively loading the data into the ListGrid in multiples of (75). Hence we selectAll is clicked only those which are in the viewport are selected.

Even if we were to issue a row count query and udpate the totalRows (20K+) , As it is a huge dataset, dragging the scrollbar to the end is blocking the page completely and very slow.

Only possible solution we are thinking as of now is when user selects Select All checkbox and when we knew that only 75 odd rows have been selected , we will the id (by which the 20k rows are fetched) to the server and processing it.

Is there any other way that i can achieve this task of selecting all the records at one go when user selects Select All checkbox.

SmartClient version:
SC_SNAPSHOT-2011-12-05/LGPL Development Only (built 2011-12-05)
Browser : Chorme 32.0.1/Firefox 26

Viewing all articles
Browse latest Browse all 4756

Trending Articles