QUestions about the new Vaadin Grid

Hello,

we are currently evaluting the Vaadin Grid and have some trouble. We are not sure if this is the desired behavior or if we are using it wrong.

Our grid cotains only one column and is placed inside a CSS Layout.

grid = new Grid();
grid.addStyleName(CustomValoTheme.FLEX_ITEM_EXPAND); //flex-item-expand
grid.setSizeFull();
grid.setReadOnly(true);
grid.setSelectionMode(SelectionMode.SINGLE);
addComponent(grid);

1.) The column(grid) is to width and displays a horizontal scroll bar (See Image Grid-Width)

Is it possible to force the column to have the same width as the Container (The CssLayout in our case) and hide the Scroll bar?

  1. When we are changing the Size of the CSSLayout, the Grid gets resized correctly, but not the content of the Grid.
    (See Image resize)

Is it possible to resize the content of the grid, when the size of the container changes?

If you need further information please feel free to ask.

Thanks in Advance
Regards

19136.png

Add missing attachments
19136.png
19138.png

Hey Tobias,

Very difficult to say without seeing the DOM, or the SCSS. What’s the width of the CssLayout that contains the Grid component? Does the same thing happen with a non-modified Valo theme?

Can you provide a runnable example for us to test?