Grid and window resize

Hi,

The new Grid component looks really neat, and will sure come in handy!

I have one problem at the moment though, and that is with the Grid’s container resizing. Here is the smallest possible code sample that I could come up with that illustrates my issue:

public class MyUI extends UI {

    private static final Object C1 = "1";
    private static final Object C2 = "2";
    private static final Object C3 = "3";

    @Override
    protected void init(VaadinRequest vaadinRequest) {
        Grid g = new Grid();

        g.addColumn(C1);
        g.addColumn(C2).setExpandRatio(1);
        g.addColumn(C3);
        
        g.setSizeFull();

        Item item = g.getContainerDataSource().addItem("i1");
        item.getItemProperty(C1).setValue("C 1");
        item.getItemProperty(C2).setValue("C 2");
        item.getItemProperty(C3).setValue("C 3");

        setContent(g);
    }
// Snip - rest of the class

When resizing the browser window, the component does fill the browser window as expected, but the column widths aren’t recalculated, leaving all of the columns in their initial state.

My question is: Is this by design, a missing feature, or am I missing a configuration? :slight_smile:

Having same issue. The behavior you are expecting is a reasonable default (unless someone who sets the Grid size full for some reason does not want it to resize with the browser).

buenas, tambien ocurre que cuando se congela una columna, y el grid ocupa toda la pantalla, no aparecen las barras de desplazamiento si se desborda el ancho de todas las columnas del grid.

There’s at least issue
#16539
about column width recalculation, and also
#16508
, and
#16748
, and a few other similar ones. At least the first one of those is currently under work, so I hope the fixes will come soon.

I’m currently using Vaadin 7.6.2 and have exactly the same issue.

Seems like a more recent defect ticket exists for the same issue:
#19415
.