How To center Vaadin grid header and compared to its colum row?

25 Views Asked by At

I want to center both table header and its column row inside Vaadin Grid..

I run this HashMapWithGridAndBinder example (https://cookbook.vaadin.com/grid-with-map).

And it is how it looks. enter image description here

How to set the colum header to be centered compared its colum row content?

many thanks. vaadin-flow 24

1

There are 1 best solutions below

1
slawalata On
 grid.addColumn(map -> map.get(key))
         ...
         .setHeader(key)
         **.setTextAlign(ColumnTextAlign.CENTER);**