Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Grid Text in columns cutted
i didn't found that question in the forum before just about the width of columns in grid. So my Problem:
I have a grid with two columns. The data of the second column which is displayed are strings. Sometimes there is a very large String. But instead of giving me the opportunity to scroll the column to se the whole String, there are just three dots like"..." and the rest of the string is cutted.(you can see this in the screenshot)
How can I get the grid to provide me a scrollbar, to scroll the whole string. Or is this a behavoiur of the default TextRenderer? Must I implement an extendedTextRenderer which doesn't cut the values off? Or is there another way to get that solution?
Here is my Grid initialization:
userManagementGrid.setContainerDataSource(this.userContainer); userManagementGrid.setColumns(PROPERTY_ID_USER_NAME, PROPERTY_ID_USER_ROLES); userManagementGrid.getDefaultHeaderRow().getCell(PROPERTY_ID_USER_NAME). setText(messages.get("UserAdministrationDialog.grid.userNameColumn.caption")); userManagementGrid.getDefaultHeaderRow().getCell(PROPERTY_ID_USER_ROLES). setText(messages.get("UserAdministrationDialog.grid.userRolesColumn.caption")); //Config the grid userManagementGrid.setSelectionMode(SelectionMode.MULTI); userManagementGrid.setFrozenColumnCount(1); userManagementGrid.getColumn(PROPERTY_ID_USER_ROLES).setExpandRatio(1);
Thank you for helping me out
If I understand your case properly, the answer is that Grid is not having this kind of feature yet.
You could set fixed width to column that is wide enough to accomodate the text and set the width of Grid to 100%. Then put the Grid in layout component that is narrower than total width of the Grid, hence scroll bar will appear in Grid.