grid multimode selection bug

hello, i have a problem that i cannot deselect the checkboxes once they are selected and also the header-checkbox is missing which will check all

see here the picture attached

I think you have two separate topics here:

  • select all checkbox is not supported for lazy loading
  • your objects don’t have unique hashcode/equals methods resulting in weird selecting behavior

thanks for your answer. oooh so there is no way to select all checkboxes? in lazy loading atleast

Well that would literally kill the idea of lazy loading :sweat_smile:

but what about something like only selecting ALL which are visible?

i’d have to try to create that myself probably?

That would make no sense because it’s not expected. Yes creating this by your own is the only way.

but then again i cannot place a “select all” checkbox in that column , which only appears when multiselect is activated

there is no java reference or something for it

Correct, you have to do it outside of the grid or dirty css hacks

ok thanks! that gives me enough direction in what to do for the “select all” checkbox

about the second thing i dont know what you mean with nonunique hashcode/equals method? i can only select the checkboxes but never deselect

Your objects added to the grid aren’t unique / don’t provide unique identifies

but in another grid with the same objects in it its working :thinking: are you sure it sbecause of nonunique identifiers?

It’s the only thing I can guess by the provided information

You can show the select all checkbox with this:

        GridMultiSelectionModel model = (GridMultiSelectionModel)grid.getSelectionModel();
If the user is clicking on this, then the entire data will be loaded, so it might be slow. And it won't be shown if the grid does not has an item count.

thank you so much! It works