How to select only one column in a Grid?

Is there a way to implement a checkbox with check all functionality per column?
I have a grid with some text columns and some checkboxes and I need to add a TriState Checkbox in the header row for those columns with the possibility to check them all or uncheck them.
Thank you

Sorry for being so blunt, but I have no idea what you are trying to say.

What do you mean with check all functionality per column?
What’s a TriState Checkbox? (Edit: oh, its a checkbox whose value can also be null. I don’t think that’s a thing yet in Vaadin)
And how does it all relate to selecting only one column in a Grid?