Hi all,
I am new to Vaadin.
I was trying to add a combox in a grid.
Code -
Grid grid = new Grid();
grid.setWidth(“800px”);
grid.setHeight(“200px”);
grid.addColumn(“Rank”, ComboBox.class );
ComboBox selectRankComboBox = new ComboBox(“”);
Integer rank = new Integer {1, 2, 3, 4, 5};
for (int i : rank){
selectRankComboBox.addItem(i);
}
grid.addRow(selectRankComboBox);
layout.addComponent(grid);
Attached is the screenshot of the output.
It is showing the Id
How can I display the combox in a grid?