dhS
dhS

Reputation: 3694

How to set Grid in Vaadin

Hi I am working on a vaadin application integrating the vaadin app in the application UI . The image is : enter image description here

the Scroll bar is up and grid is below.

For setting a grid i have tried setSizeFull() and layout.setSizeUndefined() but it's not working for the grid..

this happens when i add object of BeanItemContainer to the grid.

BeanItemContainer<Partner> container = new BeanItemContainer<Partner>(Partner.class, model.getPartnerList());
        Grid grid = new Grid();


         grid.setColumns("code","surname","name","companyName");

         grid.getColumn("code").setHeaderCaption("Code");
         grid.getColumn("lastname").setHeaderCaption("Last Name");
         grid.getColumn("name").setHeaderCaption("First Name");
         grid.getColumn("companyName").setHeaderCaption("Company");

         //grid.setContainerDataSource(container);
        layout.addComponent(grid);
        addComponent(layout);
        return layout;

Upvotes: 1

Views: 220

Answers (1)

Mahendran Kandiar
Mahendran Kandiar

Reputation: 980

I have had this error too.

A developer who compiled the theme when project started had

$v-included-components: remove($v-included-components, grid); in the theme scss file.

Please comment this line out or remove the line completely and try again

Upvotes: 2

Related Questions