Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Vaadin 23 Grid with details – stretch instead scroll

Is it possible to set up a Vaadin Grid with details (like in the Item Details example https://vaadin.com/docs/latest/components/grid) to stretch instead of displaying a scroll? I need to let the Grid grow as much as it needs to. Please tell me how to implement it.

P.S

I may only disable the visual scroll with grid.setVerticalScrollingEnabled(false); but it doesn’t help with what I’m looking for. I also need to stretch the grid to avoid the grid scrolling at all. I’d like to use the entire page scrolling instead of grid personal scrolling.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is a flag you can set

setAllRowsVisible

public void setAllRowsVisible​(boolean
allRowsVisible) If true, the grid’s height is defined by its rows. All
items are fetched from the DataProvider, and the Grid shows no
vertical scroll bar.

Note: setAllRowsVisible disables the grid’s virtual scrolling so that
all the rows are rendered in the DOM at once. If the grid has a large
number of items, using the feature is discouraged to avoid performance
issues.

Parameters:

allRowsVisible – true to make Grid compute its height by the number of
rows, false for the default behavior

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading