Grid-> selectAll Checkbox missing

I’ve set the grid to grid.setSelectionMode(Grid.SelectionMode.MULTI); and the grid looks like this. I do not see the selectAll checkbox at the top. What am I missing here?
image.png

Also is it depends on the type of gird i.e., InMemory vs lazy ?

Yes, it’s not enabled by default when the data provider is lazy ( since it will fetch all the selected data from the database)

ok that makes sense

((GridMultiSelectionModel) grid.getSelectionModel())
.setSelectAllCheckboxVisibility(
GridMultiSelectionModel.SelectAllCheckboxVisibility.VISIBLE);

That’s the code to enable it ( it’s not recommended since the query can be slow and consume a lot of memory)

I used this but stil I do not see that

Maybe it’s because there are multiple header rows. You can check if there is a ticket about it.