[CLOSED] GridPanel AutoHeight and FitLayout

  1. #1

    [CLOSED] GridPanel AutoHeight and FitLayout

    Hi there !

    I search through the forum and saw a number of topics about "GridPanel AutoHeight" and FitLayout.
    I know that Geoffrey already post about we need to set the height of the parent element to use the FitLayout and a GridPanel.

    But what if I have a ViewPort in a MasterPage, and a Panel in the <Center> region. Then in a child page, have a FitLayout, then a TabPanel, and into a Tab of the TabPanel, have a Panel and another FitLayout, and then a GridPanel ? The TabPanel does fit ok, but the GridPanel doesn't fit to it's parent Panel.

    What I want to do is the GridPanel fit to the 100% height of the Tab (or the Panel inside the TabPanel)

    Am I wrong using the fitlayouts ? Or is there a way to achieve what I want ?

    <U>Master Page</U>
    .
    .
    .
    <ext:ViewPort ID="ViewPort1" runat="server">
    .
    .
    .
    <center>
        <ext:Panel ID="PanelRegionCentro" runat="server" Title="HOME" AutoScroll="true" >
            <content>
                <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server" />
            </content>
        </ext:Panel>
    </center>
    <U>ChildPage</U>
    
    
    
    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <ext:FitLayout ID="FitLayout1" runat="server">
            <ext:TabPanel ID="TP" runat="server" ActiveTabIndex="0" TabPosition="Top" > 
                <Tabs>
                    <ext:Tab ID="Tab" runat="server" >
                        <Content>
                            <ext:Panel ID="Panel1" runat="server">
                                <Content> 
                                    <ext:FitLayout ID="FitLayout2" runat="server">
                                        <ext:GridPanel ID="Grid" runat="server" Frame="true" StoreID="Store1" StripeRows="true">
                                            <ColumnModel ID="ColumnModel1" runat="server">
                                                <Columns>   
                                                    <ext:Column ColumnID="C1" DataIndex="C1"  />
                                                </Columns>
                                            </ColumnModel>
                                        </ext:GridPanel>
                                    </ext:FitLayout>
                                </Content>
                            </ext:Panel>
                       </Content> 
                    </ext:Tab> 
                </Tabs>
            </ext:TabPanel>
        </ext:FitLayout>
    </asp:Content>
    Thanks ...

    Alfonso Penunuri.
  2. #2

    RE: [CLOSED] GridPanel AutoHeight and FitLayout

    Ok ... I've tried to delete this post, but I can't, hehe.

    I achieve what I want using a RowLayout ...

    Learned something new today ...

    So, this post can be deleted or marked as CLOSED.

    Thanks anyway.

    Cheers.

    Alfonso Penunuri.
  3. #3

    RE: [CLOSED] GridPanel AutoHeight and FitLayout

    Hi Alfonso,

    You can add the <ext:FitLayout> directly to the <ext:Tab>.

    Example

    <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <ext:FitLayout ID="FitLayout1" runat="server">
            <ext:TabPanel ID="TP" runat="server" ActiveTabIndex="0" TabPosition="Top" > 
                <Tabs>
                    <ext:Tab ID="Tab" runat="server" >
                        <Content>
                            // Add another <ext:FitLayout> here, or remove the following <ext:Panel>
                            // The <ext:FitLayout> can be added to a <Tab>
                            <ext:Panel ID="Panel1" runat="server">
                                <Content> 
                                    <ext:FitLayout ID="FitLayout2" runat="server">
                                        <ext:GridPanel ID="Grid" runat="server" Frame="true" StoreID="Store1" StripeRows="true">
                                            <ColumnModel ID="ColumnModel1" runat="server">
                                                <Columns>   
                                                    <ext:Column ColumnID="C1" DataIndex="C1"  />
                                                </Columns>
                                            </ColumnModel>
                                        </ext:GridPanel>
                                    </ext:FitLayout>
                                </Content>
                            </ext:Panel>
                       </Content> 
                    </ext:Tab> 
                </Tabs>
            </ext:TabPanel>
        </ext:FitLayout>
    </asp:Content>
    Hope this helps.

    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] GridPanel AutoHeight and FitLayout

    Hi Alfonso,

    When it's time for you to upgrade to v0.7, please ensure you review the v0.7 breaking changes post, see http://forums.ext.net/showthread.php...2938-12-1.aspx

    The <Content> property/region has been changed to <Body>. Item #1 on the breaking changes.

    Hope this helps.

    Geoffrey McGill
    Founder
  5. #5

    RE: [CLOSED] GridPanel AutoHeight and FitLayout

    Hi Geoffrey !

    Thanks for the replies ...

    Of course I'm going to download the new version. I can't wait to test it and experience it !

    Regards.

    Alfonso Penunuri

Similar Threads

  1. [CLOSED] AutoHeight gridpanel and scrollbars
    By 78fede78 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 22, 2010, 5:06 PM
  2. [CLOSED] Gridpanel No Scroll Bar (Autoheight?)
    By JonG in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 10, 2010, 11:39 AM
  3. [1.0] gridpanel autoheight
    By SouthDeveloper in forum 1.x Help
    Replies: 2
    Last Post: Feb 12, 2010, 10:09 AM
  4. GridPanel autoHeight problem
    By salihb in forum Bugs
    Replies: 0
    Last Post: Aug 25, 2009, 3:16 AM
  5. [CLOSED] Gridpanel Autoheight
    By speedstepmem2 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: May 11, 2009, 9:42 AM

Posting Permissions