With Vaadin Grid, I want to generate multiline cells for every cell that have more content in cell that overlaps its width.
I have allready tried:
java
Another way of fitting long scrolling text into a grid column is to set a row height for the grid and use a component renderer and render a textarea in the grid which contains the text. This works good because if the text is too long the user will get a scrollbar inside the cell to see the overflowed text.
Column screen = grid.addComponentColumn(role->{
TextArea ta = new TextArea();
ta.setValue(VALUE_PROVIDER_TEXT);
ta.setStyleName("clear");
ta.setHeight("100px");
ta.setReadOnly(true);
ta.setWidth("150px");
return ta;
});
screen.setWidth(150);
screen.setCaption("Screens");
grid.setBodyRowHeight(100);
and this in the css
.v-textarea-clear{background-color: transparent;border: none;}
Example