Is it possible to align all header row besides the last one according to ColumnTextAlign value?
Code snippet:
final Grid<String> g = new Grid<>();
final Column<?> col = g.addColumn(String::toString).setHeader("Header 1").setTextAlign(ColumnTextAlign.END);
g.prependHeaderRow().getCell(col).setText("Header 0");
g.appendHeaderRow().getCell(col).setText("Header 2");
g.appendHeaderRow().getCell(col).setText("Header 3");
g.prependFooterRow().getCell(col).setText("Footer 0");
g.appendFooterRow().getCell(col).setText("Footer 1");
g.appendFooterRow().getCell(col).setText("Footer 2");
Result attached:
As you can see only last header cell (first footer) text is correctly aligned. Is it works as expected? If yes, I’d be grateful for some workaround.
It works for VaadinIcon grid header content as well. Just put it into the VerticalLayout with required component alignment set. I’m using Vaadin 14.1.25.
It works for VaadinIcon grid header content as well. Just put it into the VerticalLayout with required component alignment set. I’m using Vaadin 14.1.25.
Thanks for your input. Actually Im aware of such kind of workarounds. Unfortunately it does not work when sort indicator is visible.