let's say I have a code like this
Grid g = new Grid(2,2);
Label l = new Label("Hello");
g.setWidget(0,1, l);
s.setColspan(0,1,2); // there is no such method :(
let's say I have a code like this
Grid g = new Grid(2,2);
Label l = new Label("Hello");
g.setWidget(0,1, l);
s.setColspan(0,1,2); // there is no such method :(
Try this:
Grid.getCellFormatter().setWidth( 0, 0, "10px"); //colspan
Grid.getCellFormatter().setHeight( 0, 0, "10px"); //rowspan
If it's an option you can use FlexTable instead of Grid:
FlexTable flexTb= new FlexTable();
flexTb.getFlexCellFormatter().setColSpan(0, 1, 2);
flexTb.setWidget(0, 1, new Label("Hello"));