Hi Team ,Im using Vaadin 14, I have 2 columns in Twin Col Grid i want to make those columns resizable how can i do it? Grid’s method setResizable is not there in twincolgrid , I tried to do it using this
selector.getElement().callFunction(“setAttribute”, “resizable”, true);
but it is not working , can we do it with addColumnResizeListener (i dont know what logic i need to put in it) or is there any other way please suggest something
Hello. Version 2.7.0 adds forEachGrid
, which allows you to configure any column as twincol.forEachGrid(grid->grid.addColumn(...))
.
How can I change the column size with this approach? :)
Hello. You can set the width when you create the column:
twincol.forEachGrid(grid->grid.addColumn(...).setWidth("100px"))
If you want to set the width after the column has been created, you need to call getAvailableGrid()/getSelectionGrid() and configure each column separately.
Ah great! Thank you!
The plugin is very helpful. :-)