Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Select/unselect all checkbox
Hello,
I've been searching for answers for a small issue. I hope you can help me.
I have a grid in multiselect mode. If I click on the SELECT all checkbox (top left corner of the Grid), then all items get selected. Which is fine. But if I manually deselect all items, the "SELECT ALL" checkbox, remains selected. I have a business requirement that demands that this checkbox must be unselected if all rows are manually unselected (doh!)
I tried a hack, something of this sort (im putting 2 approaches I tried, labed 1. and 2.).
if(!tableSelected) {
1. ((SelectionModel.Multi) searchResultsTable.getSelectionModel()).reset();
2. ((SelectionModel.Multi) searchResultsTable.getSelectionModel()).deselectAll();
}
I was hoping either of these two operations will unselect the SELECT ALL box, but with no luck. Does anybody know if this is possible as Vaadin's Grid stands now?
Any help is much appreciated!