Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Change row height in grid while it is open
my application uses a Grid. I want to influence the height of its rows. Just to clarify, I do not want to set different heights for individual rows (...which apparently does not work, as found on several forum discusstions...), but I want to change all rows of a particular grid.
I found that the height of the grid rows can be influenced by the style property "line-height" (hope this is the 'official' way), so in my css I can define:
.special-grid .v-grid-cell {
line-height: 50px;
}
When I create a grid, call addStyleName("special-grid"), this grid displays the large rows, without this additional style, it displays as default.
My problem now is that I want to change the row height of the grid while it is open. During some server roundtrip it is possible to call addStyleName or removeStyleName, this information is brought to the browser (i.e. I verified that the divs actually have this style class), but it does not have any visible effect on the row height.
Is there a way how I can force the grid to recalculate its dimensions?
I found the client side method com.vaadin.client.widgets.Grid.resetSizesFromDom(), but found how way how to trigger it from server.