How to create a grid with columns without backend data

Hi there, i am quite new to vaadin grid creation. May i know is there any way to create a grid with empty column and rows in grid and have a column name for each column? Thank you for viewing.

Hi, which version of Vaadin are you talking about?

-Olli

Hi Olli, i am referring to Version 8 thanks

Then you’ll just need the addColumn method: https://vaadin.com/download/release/8.4/8.4.3/docs/api/com/vaadin/ui/Grid.html#addColumn-java.lang.String-

The Grid.Column object it returns can be used to set the title.

-Olli

Thank you for your help

You’re welcome!