I am using BeanItemContainer 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?
Something like this:
String propertyId = "someFieldName";
Grid.Column col = myGrid.getColumn(propertyId);
if (col != null) {
col.setHeaderCaption("Customer Name");
} else {
// column doesn't exist
}