Announcement

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

    ListGrid resize with columns widths set problem

    Hi

    I have problem with resizing ListGrid. When I resize browser's window or Window element, ListGrid is getting bugged.

    Here is simplified example to see this bug:
    Code:
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.grid.ListGridRecord;
    
    public class MainEntryPoint implements EntryPoint {
    
        public void onModuleLoad() {
            ListGridRecord[] records = new ListGridRecord[20];
            for (int i = 0; i < records.length; i++) {
                records[i] = new ListGridRecord();
                records[i].setAttribute("a", "a" + i);
                records[i].setAttribute("b", "b" + i);
            }
    
            ListGrid grid = new ListGrid();
            grid.setFields(new ListGridField[]{new ListGridField("a", "a", 250), new ListGridField("b", "b", 250)});
            grid.setData(records);
            grid.setWidth100();
            grid.setHeight100();
            grid.draw();
        }
    }
    I attached 2 images to show how page looks after refresh and how it looks bugged after resizing. The thing is ListGrid size is equal to window's size, but after resizing ListGrid's content is smaller and there are scroll bars visible. Scrollbars are bugged too. Try resizing columns.

    I figured out that this problem occurs only when when columns widths are set e.g. 200. When I set column width to "*" there is no bug.

    I am using SmartGWT 3.0 and FF 5.0 (or IE 8.0).
    There is no Exception.

    Please help,
    Adam
    Attached Files

    #2
    You most likely have external CSS in the page interfering with your SmartGWT components - see FAQ.

    Comment


      #3
      I've ran into this problem before and currently experience it in a version from 2011-09-11. I remember seeing a bug report on this 3-4 months back and the response to it signified a patch had been issued. If you are using a version prior to 2012, I'd give a new nightly build a shot. I've been unable to reproduce the behavior you are seeing with the nightly dated 2012-02-15.

      Comment


        #4
        Thanks for fast replay.
        There are no external CSS in the page. Nightly build from 2012-02-23 fixed this problem :)

        Comment


          #5
          This bug is still in Smart GWT 3.0 or so it seems, what can I do about that?

          Comment

          Working...
          X