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

Unselect ALL in listgrid via the checkbox header

$
0
0
Hi,

Using this code sample:

Code:

ListGrid grid = new ListGrid(DataSource.get("sys_configuration"));
                grid.setAutoFetchData(true);
                grid.setSelectionAppearance(SelectionAppearance.CHECKBOX);
                grid.setSelectionType(SelectionStyle.SIMPLE);
                grid.addSelectionChangedHandler(new SelectionChangedHandler() {
                       
                        @Override
                        public void onSelectionChanged(SelectionEvent event) {
                                System.out.println(event.getSelection().length);
                        }
                });

                VLayout test = new VLayout();
                test.setWidth(600);
                test.setHeight(400);
                test.addMember(grid);
                test.draw();

When I select all the records using the checkbox in the header, and then unselect all the records using the same mechanism, the number of selected records array passed in the SelectionEvent is wrong. If you look in the given test case, I have the following output:

Code:

19
18
17
16
15
14
13
12
11
10
9
9
9
9
9
9
9
9
9
9

If would have expected to have something going down to 0... ?

Thanks,
Thomas

PS: We have SmartGWT 4.0p

Viewing all articles
Browse latest Browse all 4756

Trending Articles