setHeightByRows behavior ? vaadin 8 grid


I try to align height of 2 grids with setHeightByRows but because one grid is 3 columns and one is 2 columns the height are not visually equal, someone have an idea ?
I haven’t define css for the grids or the customcomponents embedding the grid, they are the same except for the number of columns in grid. If I define the height with setHeight everything is align.

have you also set HeightMode to you grid?
Something like this :


On the other hand, if there is a horizontal scrollbar due to the reason that there is not enough space for 3 columns, it will not help.
Hopefully it will help,

Thanks for your answer Anastasia the setHeightMode was define but you answer gave me the solution, when I set an explicit width to the last column I have this problem (even with no horizontal scrolling present) there’s no problem if I set width for the 2 first columns.