Currently, I try to set Grid Row height to fit Image Icon display.
I found grid.setRowHeight() method, however, after set Row Height, it applies to both header and data Row.
For Grid I use addComponentColumn method to create Image Display column. will that be the case?
And by the way, it there any method to set Grid.HeaderRow’s height individually?
See
https://github.com/vaadin/framework/issues/9425 for an enhancement request to make each section (header, body, footer) individually configurable. Note that the setting would still apply to the whole section, so e.g. all header rows would have the same height.
I tried grid.setStyleGenerator() method, but looks like no effect at all for setting the Grid body Row height
I also follow the sample code in official tutorial :
I have tried to limit the Grid Header’s height
for(Object column : gridComp.getColumns()){
gridComp.getHeaderRow(0).getCell(((Grid.Column)column).getId())
.setStyleName(“heaer_cell1”);
}
Yesterday I made
a patch that provides separate row height configuration for the different sections in Grid. Once that is merged and we build another 8.1-SNAPSHOT, you should be able to check it out and start using it. The fix will hopefully also make it to 8.1.2.