Vaadin-grid show/hide the columns by click method.

Hi

I have a vaadin-grid in my



angular2 project



with different columns like (column heder: firstname, lastname, age, country). I’m trying for the functionality to hide and show a particular column. whenever i clicked on column header of firsname then only the lastname column has to display in the vaadin-grid.

Can any one help me to acheive my task.

Thank you.

plunker link
http://plnkr.co/edit/FvqxLH7CjI6kctiqCnrA?p=preview

Hi,

you should be able to enable column hiding by using the
hidable
attribute on your [font=courier new]

[/font] elements. See the [url=https://vaadin.com/docs/-/part/elements/vaadin-grid/vaadin-grid-columns.html#vaadin-grid.columns.hiding] Hiding Columns [/url] section of the Grid documentation for more details.