-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Hi there,
I'm trying to use a Grid inside a ResponsiveColumn. I think the trouble I meet is about the Grid's Height.
In order to force the Grid Height calculation, I've put the Grid inside a Panel container; but it doesn't work because the Grid doesn't display or better it seems to have a 0px Height.
grid.setDataProvider(new GridDataProvider());
grid.addColumn(Row::getCode);
grid.addColumn(Row::getDescription);
grid.getColumns().get(0).setCaption("Code");
grid.getColumns().get(0).setSortable(false);
grid.getColumns().get(1).setCaption("Description");
grid.getColumns().get(1).setSortable(false);
grid.setSizeFull();
Panel panel = new Panel();
panel.setSizeFull();
panel.setContent(grid);
ResponsiveLayout responsiveLayout = new ResponsiveLayout(ResponsiveLayout.ContainerType.FLUID).withFullSize();
ResponsiveRow rootResponsiveRow = responsiveLayout.addRow();
rootResponsiveRow.setSizeFull();
ResponsiveColumn column = rootResponsiveRow.addColumn().withComponent(panel);
column.setSizeFull();
setContent(responsiveLayout);
Diving in the JavaScript at runtime I've found a DIV (yellow circled) having the class v-grid-tablewrapper with height: 0px; furthermore I noticed an upper DIV (blue coloured) having col-container class with only width: 100% attribute and not Height attribute.
After some trials it seems all working good when at runtime I manually add the height: 100% attribute and after a browser resize.
... but I'm not sure this is the right way toward my goal.
Every hint or even a workaround will be appreciate.
Thanks in advance.

