Results 1 to 2 of 2

Thread: Misalignment of grid cells along with the last header cell

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User
    Join Date
    Mar 2014
    Posts
    6
    Vote Rating
    0
      0  

    Default Misalignment of grid cells along with the last header cell

    Hi,
    We have upgraded the GXT environment from 2.3.0 to 2.3.1. We are facing an issue of misalignment of grid cells along with the last header cell.
    There is a mismatch between the last column and the rows. Rows ends before the last column and values are not getting displayed correctly.
    This issue is observed on IE, Firefox and Safari browsers.
    The misalignment gap increases with the increased number of columns and headers.
    A sample code displaying the same is pasted below along with screen shots displaying the misalignment:

    Screenshot:
    Untitled.png

    Code:

    import java.io.Serializable;
    import java.util.ArrayList;
    import java.util.List;

    import com.extjs.gxt.ui.client.data.BaseModel;
    import com.extjs.gxt.ui.client.data.ModelData;
    import com.extjs.gxt.ui.client.store.ListStore;
    import com.extjs.gxt.ui.client.widget.grid.CellSelectionModel;
    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.grid.HeaderGroupConfig;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;

    public class SampleGridWidget implements GridWidget
    {
    private Grid grid;
    ArrayList<EmpPojo> emp = new ArrayList<EmpPojo>();
    ListStore<EmpPojo> store = new ListStore<EmpPojo>();

    public void onModuleLoad()
    {
    List<ColumnConfig> col = new ArrayList<ColumnConfig>();

    emp.add( new EmpPojo(1, "Jill", 25, "10-Oct-1989","7702054533","[email protected]" ) );
    emp.add( new EmpPojo(2, "Deena", 35, "2-Nov-1980", "8954712566", "[email protected]" ) );

    ColumnConfig column = new ColumnConfig();
    column.setId( "eID" );
    column.setHeaderHtml( "Enrollment ID" );
    column.setWidth( 100 );
    col.add( column );

    column = new ColumnConfig();
    column.setId( "name" );
    column.setHeaderHtml("Name");
    column.setWidth( 100 );
    col.add( column );

    column = new ColumnConfig();
    column.setId( "age" );
    column.setHeaderHtml( "Age" );
    column.setWidth( 100 );
    col.add( column );

    column = new ColumnConfig();
    column.setId( "DOB" );
    column.setHeaderHtml( "DOB" );
    column.setWidth( 100 );
    col.add( column );

    column = new ColumnConfig();
    column.setId( "contact" );
    column.setHeaderHtml( "Contact" );
    column.setWidth( 100 );
    col.add( column );

    column = new ColumnConfig();
    column.setId( "emailID" );
    column.setHeaderHtml( "Email ID" );
    column.setWidth( 100 );
    col.add( column );

    ColumnModel cm = new ColumnModel( col );

    store.add(emp);

    grid = new Grid<EmpPojo>(store, cm);
    grid.setAutoHeight(true);
    grid.setAutoWidth(true);
    grid.setSelectionModel(new CellSelectionModel<ModelData>());

    RootPanel.get().add(grid); }


    }

    public class EmpModel extends BaseModel implements Serializable{

    private static final long serialVersionUID = 1L;

    public EmpModel(int i, String string, int j, String string2, String k, String string3) {
    set( "eID", i );
    set( "name", string );
    set( "age", j );
    set( "DOB", string2 );
    set( "contact", k );
    set( "emailID", string3 );
    }

    }

    Is there a workaround for this bug?

    Thanks,
    Shweta

  2. #2
    Sencha User
    Join Date
    Mar 2014
    Posts
    1
    Vote Rating
    0
      0  

    Default Same problem...

    I have the same issue and I've been trying to work around the problem for a while. I've collected the following information.

    1- For me the problem is only happening in chrome, may be firefox as well, can't remember.
    2- When I debug in hosted mode using GWT plugin the problem does not occur.
    3 - Even If I force safari compilation only, the problem stills happening for chrome but not for safari. That's specially weird because I would expect the behavior to be the same for both browsers.

    I tried to force chrome compilation using <set-property name="user.agent" value="chrome"/>. When I do that I get the next error...
    [INFO] [ERROR] The value chrome was not previously defined.
    [INFO] [ERROR] Line 63: Unexpected exception while processing element 'set-property'

    To me it looks like chrome is using a permutation not meant for it and that's the source of the problem. The solution would be to find a way to use the same generation it's being used in hosted mode, but I still don't know how to do that. I hope you guys can give us some ideas.

    SPECS:
    -GWT: 2.4.0
    -GXT: 2.2.4

Posting Permissions

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