[CLOSED] GridPanel doesn't automatically resize using 'fit' layout and IE9

  1. #1

    [CLOSED] GridPanel doesn't automatically resize using 'fit' layout and IE9

    I have a GridPanel inside of a Panel where the Panel is using a Layout="fit". The GridPanel has ForceFit=true. Works fine on Firefox and Chrome. When the window is resized to a larger size on IE9, the Panel and GridPanel respond correctly by re-laying out the contents. But, when the window is made smaller, data clips because it isn't executing the re-layout.

    The GridPanel is the only 'Item' of the Panel.

    I can produce an example if it helps.
    Last edited by geoffrey.mcgill; Oct 15, 2012 at 7:25 PM. Reason: [CLOSED]
  2. #2
    Is this the same problem posted here...

    http://forums.ext.net/showthread.php...dths-correctly
    Geoffrey McGill
    Founder
  3. #3
    Hi,

    If it is another problem, then yes, please provide a sample to reproduce.
  4. #4
    The code is the same as the other problem, but the issues are different. In the other post, I can't resize the columns correctly. In this post, the Grid isn't resizing correctly with the window (specifically, when I make the browser window smaller), only in IE. I posted a simplified example on the other topic, but unfortunately, simplifying the code made this problem disappear. :( I still have the problem in a more complex case, but I'll have to work more on a simple failure example.

    Thanks for now.
  5. #5
    Ok, thank you for the details.

    Seems I can't see a proper layout configuration which would manage the GridPanel size on window resizing.

    Here is a simplest working case.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                Store store = this.GridPanel1.GetStore();
                store.DataSource = new object[] 
                { 
                    new object[] { "test1", "test2", "test3" },
                    new object[] { "test4", "test5", "test6" },
                    new object[] { "test7", "test8", "test9" }
                };
                store.DataBind();
            }
        }
    </script>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET v2 Example</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
    
        <ext:Viewport runat="server" Layout="FitLayout">
            <Items>
                <ext:GridPanel ID="GridPanel1" runat="server">
                    <Store>
                        <ext:Store runat="server">
                            <Model>
                                <ext:Model runat="server">
                                    <Fields>
                                        <ext:ModelField Name="test1" />
                                        <ext:ModelField Name="test2" />
                                        <ext:ModelField Name="test3" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel runat="server">
                        <Columns>
                            <ext:Column runat="server" Text="Test1" DataIndex="test1" Flex="1" />
                            <ext:Column runat="server" Text="Test2" DataIndex="test2" />
                            <ext:Column runat="server" Text="Test3" DataIndex="test3" />
                        </Columns>
                    </ColumnModel>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
    </body>
    </html>
    More layout examples you can find here:
    https://examples2.ext.net/#/search/layout

    If you can provide a mockup of required layout, we could suggest something.
  6. #6
    I believe I figured out the problem. My <!DOCTTYPE> tag was not the first html tag -- it was following the <script> stuff. This caused IE to go into "Quirks" mode. Moving the tag up above the <script> tag solved the problem.

    Yay!
  7. #7
    Yes, I think that doctype declaration must go before the <html> tag.

Similar Threads

  1. [CLOSED] Portal Layout Resize Issues
    By Patrick_G in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jan 18, 2013, 3:50 AM
  2. [CLOSED] VBoxLayout layout does not refresh the layout automatically
    By leon_tang in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 23, 2011, 1:52 PM
  3. Gridpanel doesn't resize properly
    By gdog_5021 in forum 1.x Help
    Replies: 10
    Last Post: Aug 18, 2011, 2:45 PM
  4. GridPanel doesn't resize with browser
    By jimlahey in forum 1.x Help
    Replies: 1
    Last Post: Aug 18, 2011, 2:58 AM
  5. [CLOSED] [1.0] Fit Layout in dialog does not resize
    By jchau in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 04, 2010, 8:41 PM

Posting Permissions