Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

TUTORIALVaadin lets you build secure, UX-first PWAs entirely in Java.
Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Calling javascript synchronously by Enver Haase, 1 month ago
Custom column names in a Grid
I am using BeanItemContainer<EntityBean> for populating the Grid. I see that the grid.setColumn("colName1", "colName2") must match the field variables of EnitityBean. Else exception is thrown stating "IllegalStateException: Property id 'someFeildName' does not exist in the container". Is there any way to custom set the column names?
Last updated on
Something like this:
String propertyId = "someFieldName";
Grid.Column col = myGrid.getColumn(propertyId);
if (col != null) {
col.setHeaderCaption("Customer Name");
} else {
// column doesn't exist
}
Last updated on
You cannot reply to this thread.