Quartilan
12 Dec 2011, 9:06 AM
Can some1 pls tell me what I'm doing wrong? My grid wont fill the entire grids width.
The grid is correctly sized in width but the 1 column does not take the whole width of the grid.
public class LayoutContainerX extends LayoutContainer {
private final ColumnConfig c = new ColumnConfig("value","value", 200);
private final ListStore<ModelData> store = new ListStore<ModelData>();
private final Grid<ModelData> grid = new Grid<ModelData>(store, new ColumnModel(Arrays.asList(c)));
public LayoutContainerX(){
grid.setAutoExpandColumn("value");
grid.setAutoHeight(true);
}
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
for (int i=0; i<10; i++){
BaseModelData data = new BaseModelData();
data.set("value", "value");
store.add(data);
}
add(grid);
}
}
The grid is correctly sized in width but the 1 column does not take the whole width of the grid.
public class LayoutContainerX extends LayoutContainer {
private final ColumnConfig c = new ColumnConfig("value","value", 200);
private final ListStore<ModelData> store = new ListStore<ModelData>();
private final Grid<ModelData> grid = new Grid<ModelData>(store, new ColumnModel(Arrays.asList(c)));
public LayoutContainerX(){
grid.setAutoExpandColumn("value");
grid.setAutoHeight(true);
}
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
for (int i=0; i<10; i++){
BaseModelData data = new BaseModelData();
data.set("value", "value");
store.add(data);
}
add(grid);
}
}