Sometimes in firefox the headers of Grid don't align w/the columns in the table. Resizing the column fixes it. It seems to happen mostly on the first load of the app, but it's intermittent. Keep hitting refresh and it will eventually happen, generally within a dozen refreshes. Of course, if you demo your app in front of a customer it happens every time
public class TableColumnHeaderBug extends LayoutContainer {
public TableColumnHeaderBug() {
Viewport v = new Viewport();
RootPanel.get().add(v);
setLayout(new FitLayout());
setScrollMode(Scroll.AUTO);
List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
for (int i = 0; i < 4; i++) {
ColumnConfig cc = new ColumnConfig();
cc.setId("col" + i);
cc.setHeader("Column " + i);
cc.setWidth(40);
configs.add(cc);
}
ListStore<ModelData> store = new ListStore<ModelData>();
store.add(getTestData());
Grid<ModelData> grid = new Grid<ModelData>(store, new ColumnModel(configs));
add(grid);
v.add(this);
v.layout();
}
private List<ModelData> getTestData() {
List<ModelData> data = new ArrayList<ModelData>();
for (int i = 0; i < 4; i++) {
Map<String, Object> row = new HashMap<String, Object>();
for (int j = 0; j < 4; j++) {
if (j == 2 && i == 0){
row.put("col" + j, "Long value to demonstrate the bug" + i + "," + j);
} else {
row.put("col" + j, "" + i + "," + j);
}
}
data.add(new BaseModelData(row));
}
return data;
}
}
I just wanted to emphasize this thread. We also spotted this problem which is really annoying... Settings (MacOSX, Firefox or Safari, GXTv.1.2, GWTv.1.5).
Perhaps, but the example does not include any visibility code and I'm seeing it. But its good that someone else is experiencing this. I hate reporting intermittent bugs.