Grid detecting single checkbox selection in multi-select grid

Hi All.

I maybe just missing this but, how can I figure out which check box was clicked? We are using grid.setSelectionMode(Grid.SelectionMode.MULTI).addSelectionListener to detect the changes.

Is there also a way to have a row click check the associated check box? Does it have to be done programatically?

Thanks again for all of your help!

If you use grid.asMultiSelect(), you can get the added and removed items from the selection listener:

grid.asMultiSelect().addSelectionListener(event -> {
        Set<T> added = event.getAddedSelection();
        Set<T> removed = event.getRemovedSelection();

If you want to select/deselect a row based on row click, you’ll need to do that programmatically in an ItemClickListener, yes.

Hi Olli.

Thank you for the the quick response!!!