Vaadin 8 Grid | Problem with (dynamic) row height

Hi there,

I want to display Images in some rows of my Grid (I use ImageRenderer), which works just fine.
While the Images are displayed, the row height is still the default and therefore only part of the
Images is visible.

After some search I found a few forum posts and infos about css / scss styles. At this point I added
these Lines to my styles.scss:

.my-grid-row td { height: 460px; } I also changed the StyleName of my Grid:

gVideos.addStyleName("my-grid-row"); Well, now the row height is good and the Images are visible.
Because not every row has an Image, the Grid looks quite empty.

After a while I found a post about dynamic row height with “RowStyleGenerator” and
“CellStyleGenerator”. In Vaadin 8 they are simply called “StyleGenerator”.
So I changed my Code like this:

gVideos.setStyleGenerator((StyleGenerator) iVideoData → {
return “my-grid-row”;

return null;

[/code]I also removed the StyleName from the Grid.
Now the Grid / Row should use my “my-grid-row” Style if there is a imageUrl available.

Unfortunately it is completely ignored and all the rows have the default height, again.

Is this a Bug or am I doing something wrong?

Currently I use Vaadin 8.0.6.


The correct height is actually used und then somehow overridden.
As I scroll the Grid, Images are shown for less than a second and then the row height
is reduced to the default height. Any idea?


Unfortunately, the current Grid implementation does not support different row heights for different rows.