Loading...
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.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Show/Hide HeaderRow of Grid

Stefan Böcker
6 years ago Jan 26, 2016 3:56pm

Hi,

I want to give the user the opportunity to filter data in a grid. So I added a new HeaderRow to the grid and placed TextFields inside of every cell in the HeaderRow.

HeaderRow filterRow = grid.appendHeaderRow();
HeaderCell cell = filterRow.getCell("id");
TextField filterField = new TextField();
cell.setComponent(filterField);

Now I want to make this row hideable, so that the TextFields are not always visible, but only if the user wants to filter something. What would be the best way to do this?

As far as I know, it is only possible to hide the whole header of the grid, but I just want to hide this one row.
 

Tatu Lund
6 years ago Jan 27, 2016 7:38am
Stefan Böcker
6 years ago Jan 27, 2016 7:53am
Tatu Lund
6 years ago Jan 27, 2016 3:00pm
Enkara Dura
5 years ago Dec 15, 2016 3:00pm
Pavel Stepanov
4 years ago Mar 30, 2018 8:14pm