Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Cannot Scroll to The Last Column of a List Grid with a Large Set of Fields on IE 9

    Issue Details:
    After populating data, the grid with a large set of fields cannot be scrolled to the last column on Internet Explorer 9. This happens on both Smart GWT 2.5 and 3.0p. The issue can be replicated using the below test case, and click the populate button when the horizontal scroll bar is located at the leftmost position.

    My Test Environments:
    GWT 2.3.0
    Smart GWT 3.0p (http://www.smartclient.com/builds/Sm...GPL/2012-01-16)
    Smart GWT 2.5 (http://code.google.com/p/smartgwt/do...5.zip&can=2&q=)
    Test against compiled javascript files on Windows Internet Explorer 9.0.8112.16421, Update Versions 9.0.4
    Windows 7 Ultimate Service Pack 1


    Standalone Test Case:
    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.data.Record;
    import com.smartgwt.client.types.AutoFitWidthApproach;
    import com.smartgwt.client.widgets.Button;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    
    public class ListGridTester implements EntryPoint {
        
        public final static int COLUMN_COUNT = 100;
        public final static int ROW_COUNT = 10;
    
        ListGrid listGrid;  
    
        @Override
        public void onModuleLoad() {
            VLayout layout = new VLayout();
            layout.setHeight100();
            layout.setWidth100();
    
            // Create a list grid with COLUMN_COUNT columns
            listGrid = new ListGrid();  
            listGrid.setWidth100();
            listGrid.setHeight100();
            listGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
            listGrid.setAutoFitFieldWidths(true);
    
            ListGridField[] listGridFieldArray = new ListGridField[COLUMN_COUNT];
            for (int i=0; i<COLUMN_COUNT; i++) {
                listGridFieldArray[i] = new ListGridField("COLUMN_"+i);
            }
            listGrid.setFields(listGridFieldArray);
    
            // A button to start populating data into the grid
            Button button = new Button("Populate " + COLUMN_COUNT + " columns");
            button.addClickHandler(new ClickHandler() {
                
                @Override
                public void onClick(ClickEvent event) {
                    Record[] recordArray = new Record[ROW_COUNT];
    
                    for (int i=0; i<ROW_COUNT; i++) {
                        Record record = new Record();
                        for (int j=0; j<COLUMN_COUNT; j++) {
                            record.setAttribute("COLUMN_"+j, "r:"+i+", c:"+j);
                        }
                        recordArray[i] = record;
                    }
                    listGrid.setData(recordArray);
                }
            });
    
            layout.addMember(button);
            layout.addMember(listGrid);
            layout.draw();  
        }
    
    }
    Attached Files
    Last edited by chatchawee.tangsayan; 16 Jan 2012, 20:39.
Working...
X