How do I control column width of the Vaadin Table?

17,140

Solution 1

Finally as a solution I assigned no width value to initial columns (like first 30 columns will span naturally) and later columns with fixed width size with setColumnWidth() and it worked.

Solution 2

Please use table column name hide which s very useful for the viewer can choose what are the column he is able to view ...

http://demo.vaadin.com/sampler/#TableRowHeaders

Share:
17,140

Related videos on Youtube

dhaval
Author by

dhaval

11x AWS, 2x GCP, Docker Certified | Full-stack JavaScript Developer | Serverless Consultant | Medium • Github

Updated on June 04, 2022

Comments

  • dhaval
    dhaval almost 2 years

    I have a large table to display in one of our Vaadin application. The table has 110 columns with large text header for each column.

    On display the table looks awful as all the column header goes off the screen and the header separator loses the alignment with the data record column separator.

    I have set the table width to 100% to display the table scrollbar. I tried to set columnExpandRatio as well as column width but no success.

    Vaadin table by default sets the text header width as the column width. Is there any way i can set the header/column width to fit my data rather the header?

Related