Grid 8 full column alignment

Hi all, I’m trying to align a column to the center, but to no avail.

Following the guide results in using:

bornColumn.setStyleGenerator(person -> "centeralign"); but this is only useful if you want to apply a certain class to data rows, not header rows: so the column title is left-aligned, while the content is center-aligned, which is kind of ugly.

Is there a way to apply a style to the whole column?

Thanks a lot,

I found this:

gridWidget.getDefaultHeaderRow().getCell("columnId").setStyleName("yourStyleName"); It is not as direct as a friendly-api, but it works!