Somebody know how to hide columns in Grid component?
It’s a good component for to freeze columns but the develop team didn’t count with the idea of hide columns, very helpful to developers who saves the complete object in a hidden column.
you have to remove the “column” from the container.
Example:
// Hide not internal columns
final GeneratedPropertyContainer wrapperContainer = new GeneratedPropertyContainer(container);
wrapperContainer.removeContainerProperty("internalId");
I found very usefull setColumns method (7.5.0+). You can select very easy what propertyIds you want to see in the table and also the order in the table.
Object[] VISIBLE_COLUMN_IDS = new String[]
{"propId1", "propId2"...};
grid.setColumns(VISIBLE_COLUMN_IDS);