Announcement

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

    horizontal scroll doesn't work when listgrid contains many fields

    Using smartgwt pro 3.0
    Problems only happens on IE 9(haven't tested other version of IE), works on firefox and chrome.

    I put the listgrid in a layout and horizontal scroll bar will be shown when there are many fields.
    I found when the listgrid contains really a lot of fields (such as 25), the scroll bar doesn't work. Feels like the grid is resisting getting scrolled.

    Is there option i can set on the grid?
    Thanks

    #2
    Hi,

    I found it is because of filter editor.
    When setShowFilterEditor(false), the issue is gone.
    But however i need filter editor.

    Any suggestion?

    Thanks

    Comment


      #3
      Hi,

      I saw an similar issue is fixed in build 3.0p.
      I just tried that but however the issue is still there.

      Does anyone know how to solve this?

      Thanks

      Comment


        #4
        I've been having this problem for months now. One of my developers claimed to have posted about it, but clearly it hasn't been resolved yet.

        So, I've generated a test case using a modified form of some of the stock ShowCase code. To reproduce, create the standard 'sample project' example in Eclipse and run.

        In my normal application, this issue presents itself whether running as debug or in compiled form, but only in IE9. Firefox and Chrome, as per the earlier poster's comments, work fine.

        1. SmartClient Version: v8.2p_2012-06-10/LGPL Development Only (built 2012-06-10)

        2. IE9

        6. Code.
        IMPORTANT NOTE 1:
        This class makes reference to copies of the following classes from the Grids/Appearance/Column Order example. The only modification made to them was to alter the package to allow them to live inside my single-file example. I have omitted their source code for brevity.
        -CountryData.java
        -CountryRecord.java

        IMPORTANT NOTE 2:
        The issue manifests itself with ordering of the fields below, wherein the longer fields are shown first and the shorter fields are shown last.
        HOWEVER, moving the field 'background' to the end of the list causes the issue to be "resolved."

        Code:
        import java.util.Date;
        
        import com.google.gwt.core.client.EntryPoint;
        import com.google.gwt.core.client.GWT;
        import com.smartgwt.client.core.KeyIdentifier;
        import com.smartgwt.client.types.AutoFitWidthApproach;
        import com.smartgwt.client.util.KeyCallback;
        import com.smartgwt.client.util.Page;
        import com.smartgwt.client.util.SC;
        import com.smartgwt.client.widgets.grid.ListGrid;
        import com.smartgwt.client.widgets.grid.ListGridField;
        import com.smartgwt.client.widgets.grid.ListGridRecord;
        
        public class Test implements EntryPoint
        {
        public void onModuleLoad()
        {
        	final ListGrid countryGrid = new ListGrid();
        	countryGrid.setHeight("100%");
        	countryGrid.setWidth("100%");
        	countryGrid.setAutoFitWidthApproach(AutoFitWidthApproach.BOTH);
        	countryGrid.setAutoFitFieldWidths(true);
        	countryGrid.setShowAllRecords(true);
        	countryGrid.setShowFilterEditor(true);
        
        	countryGrid.setFields(new ListGridField("countryCode", "Flag", 40),
        			new ListGridField("background", "background"),
        			new ListGridField("gdp", "gdp"),
        			new ListGridField("independence", "independence"),
        			new ListGridField("government", "government"),
        			new ListGridField("governmentDesc", "governmentDesc"),
        			new ListGridField("capital", "capital"),
        			new ListGridField("memberG8", "memberG8"),
        			new ListGridField("article", "article"),
        			new ListGridField("countryName", "Country"),
        			new ListGridField("capital", "Capital"),
        			new ListGridField("continent", "Continent"),
        			new ListGridField("area", "area"),
        			new ListGridField("population", "population"));
        	countryGrid.setCanResizeFields(true);
        	countryGrid.setData(CountryData.getRecords());
        	countryGrid.draw();
        }
        }
        Last edited by jsres; 12 Jun 2012, 01:01.

        Comment


          #5
          What is your DOCTYPE? If you don't know what this means, hit f12 and tell us what it says for "Browser Mode" and "Document Mode" in the menu bar of the window that pops open.

          Comment


            #6
            Note: I'm using IE 9.0.8112.16421 64bit

            Pressing F12 in my test case shows:
            Browser Mode: IE9
            Document Mode: IE9 Standards

            This F12 option you suggest provides the option to change the document mode.
            The results are (as you probably already know) as follows:

            (Browser Mode: IE9)
            Document Mode: IE9 Standards - exhibits issue
            Document Mode: IE8 Standards - does not exhibit issue
            Document Mode: IE7 Standards - does not exhibit issue
            Document Mode: Quirks - does not exhibit issue

            Do you have a particular combination of modes that you recommend in particular?

            EDIT:
            Using TFSE, I find:
            In http://forums.smartclient.com/showth...hlight=doctype
            You say "For IE9 we recommend the HTML5 doctype (<!DOCTYPE html>)."

            That is the doctype I was using in my test case, and is the doctype that causes the issue to occur.

            But, in http://forums.smartclient.com/showth...hp?t=8159#aIE8
            You say "Instead, we recommend running in "quirks mode" by simply omitting a DOCTYPE tag from your .html file.
            Microsoft makes a significant effort to avoid regressions in quirks mode."

            Removing my doctype declaration causes the issue to disappear in IE9, but is incompatible with the earlier instructions to use a DOCTYPE.
            Last edited by jsres; 12 Jun 2012, 18:58.

            Comment


              #7
              This should work with the HTML5 doctype. We see what's causing the failure and will have it resolved in the next few days.

              Comment

              Working...
              X