Vaadin Grid Column resize does not work with header row.

Column nameColumn = grid.addColumn(Person::getName)
.setHeader(“Name”).setResizable(true);

// Setting a column-key allows fetching the column later
grid.addColumn(Person::getAge).setHeader(“Age”).setKey(“age”);
grid.getColumnByKey(“age”).setResizable(true);

When you want to column to be resizeable you set the column setResizable method. Demo works fine.

But the moment i add

grid.appendHeaderRow() or grid.prependHeaderRow() - the column resize stops working. I want a filter textbox on each column of the grid and thats why i add the header row.

But when you do grid.appendFooterRow() - column resize still works.

Hello Srinivasan,

this issue is commented here: https://github.com/vaadin/vaadin-grid-flow/issues/234

There is a workaround for it:

column.getElement().callFunction("setAttribute", "resizable", true);

It seems that the issue was fixed by this pull request [Support multiple resizable groups]
(https://github.com/vaadin/vaadin-grid/pull/1496/), so in the future it should not be a problem.