Results 1 to 5 of 5

Thread: [1.2] Grid header alignment in Firefox

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Ext User
    Join Date
    Apr 2008
    Posts
    30
    Vote Rating
    0
      0  

    Default [1.2] Grid header alignment in Firefox

    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

    GXT 1.2
    Firefox 3.0.4
    GWT 1.5.3

    package gxt.bugs.client;

    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import java.util.Map;

    import com.extjs.gxt.ui.client.Style.Scroll;
    import com.extjs.gxt.ui.client.data.BaseModelData;
    import com.extjs.gxt.ui.client.data.ModelData;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.LayoutContainer;
    import com.extjs.gxt.ui.client.widget.Viewport;
    import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
    import com.extjs.gxt.ui.client.widget.grid.ColumnModel;
    import com.extjs.gxt.ui.client.widget.grid.Grid;
    import com.extjs.gxt.ui.client.widget.layout.FitLayout;
    import com.google.gwt.user.client.ui.RootPanel;

    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;
    }
    }

  2. #2
    Sencha User
    Join Date
    Jul 2008
    Location
    Switzerland
    Posts
    23
    Vote Rating
    0
      0  

    Default

    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).

  3. #3
    Sencha User
    Join Date
    Jul 2008
    Location
    Switzerland
    Posts
    23
    Vote Rating
    0
      0  

    Default

    Could that be that hidden columns play a role in this bug?

  4. #4
    Ext User
    Join Date
    Apr 2008
    Posts
    30
    Vote Rating
    0
      0  

    Default

    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.

  5. #5
    Ext User
    Join Date
    Dec 2007
    Posts
    1
    Vote Rating
    0
      0  

    Default

    We also have this problem. And we need a fix.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •