ModelBasedGrid extends Grid<T> { public void setColumnVisible(String propertyId, boolean visible) { getColumnByKey(propertyId).setVisible(visible); } ModelBasedGrid(DataProvider<T, SerializablePredicate<T>> dataProvider, EntityModel<T> model,
			Map<String, SerializablePredicate<?>> fieldFilters, boolean editable, GridEditMode gridEditMode); String getCurrencySymbol(); GridEditMode getGridEditMode(); MessageService getMessageService(); void setColumnVisible(String propertyId, boolean visible); void setCurrencySymbol(String currencySymbol);  }
@Test public void testSetVisible() { ListDataProvider<Person> provider = new ListDataProvider<Person>(Lists.newArrayList()); EntityModel<Person> model = entityModelFactory.getModel(Person.class); Person person = new Person(1, "Bob", 50, BigDecimal.valueOf(76.4), BigDecimal.valueOf(44.4)); provider.getItems().add(person); ModelBasedGrid<Integer, Person> grid = new ModelBasedGrid<>(provider, model, new HashMap<String, SerializablePredicate<?>>(), false, GridEditMode.SINGLE_ROW); assertTrue(grid.getColumnByKey("name").isVisible()); grid.setColumnVisible("name", true); assertTrue(grid.getColumnByKey("name").isVisible()); grid.setColumnVisible("name", false); assertFalse(grid.getColumnByKey("name").isVisible()); }