[CLOSED] Problem with Panel into grid's topbar

  1. #1

    [CLOSED] Problem with Panel into grid's topbar

    Hi,
    I have the following code:
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="Form1" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" />
        <ext:Viewport ID="Viewport1" Layout="Border" runat="server">
            <Items>
                <ext:Panel ID="Panel3" runat="server" Region="Center" Split="false" Collapsible="false"
                    Padding="0" Header="false" BodyBorder="false">
                    <Content>
                        <ext:FitLayout ID="FitLayout1" runat="server">
                            <Items>
                                <ext:GridPanel ID="gp" runat="server" TrackMouseOver="true">
                                    <TopBar>
                                        <ext:Toolbar ID="Toolbar1" runat="server">
                                            <Items>
                                                <ext:Panel runat="server" Width="600" LabelWidth="250" ID="pnl" Frame="true" Collapsible="true"
                                                    Header="true" Title="Panel" Layout="Form">
                                                    <Items>
                                                        <ext:TextField runat="server" ID="F1">
                                                        </ext:TextField>
                                                    </Items>
                                                </ext:Panel>
                                            </Items>
                                        </ext:Toolbar>
                                    </TopBar>
                                    <ColumnModel ID="ColumnModel1" runat="server">
                                        <Columns>
                                            <ext:Column ColumnID="ID" Header="ID" Width="150" Align="Left" DataIndex="ID" Sortable="false"
                                                Hideable="false">
                                            </ext:Column>
                                        </Columns>
                                    </ColumnModel>
                                    <Store>
                                        <ext:Store ID="st" runat="server">
                                            <Proxy>
                                                <ext:PageProxy />
                                            </Proxy>
                                            <Reader>
                                                <ext:JsonReader>
                                                    <Fields>
                                                        <ext:RecordField Name="ID" Type="Int" />
                                                    </Fields>
                                                </ext:JsonReader>
                                            </Reader>
                                        </ext:Store>
                                    </Store>
                                </ext:GridPanel>
                            </Items>
                        </ext:FitLayout>
                    </Content>
                </ext:Panel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    with this code, when I collapse a panel place on grid's topbar the gridpanel not resize correctly.

    where I wrong?

    Thanks for support
    Last edited by Daniil; May 20, 2011 at 10:26 AM. Reason: [CLOSED]
  2. #2
    Hi,

    There is no auto layouting in this case.

    Please set up the following listeners:
    <ext:Panel ...>
        ...
        <Listeners>
            <Collapse Handler="Panel3.doLayout();" />
            <Expand Handler="Panel3.doLayout();" />
        </Listeners>
    </ext:Panel>
  3. #3
    Hi,

    Placing panel to toolbar is not good choice, I recommend to move it to north region
  4. #4
    Thanks for solution.
    I used panel into grid because I need to display a panel's caption. If I put my panel into north zone I lose a caption.

    Thanks a lot

Similar Threads

  1. [CLOSED] [2.0] Razor and Panel TopBar
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 6
    Last Post: Feb 20, 2012, 2:58 PM
  2. TopBar Size Problem in TreePanel, panle and grid panel
    By Ganesh3.shirsath in forum 1.x Help
    Replies: 0
    Last Post: Nov 18, 2010, 11:38 AM
  3. [CLOSED] topbar bottombar panel
    By pdcase in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 24, 2010, 8:54 PM
  4. [CLOSED] TreePanel does not show with TopBar on Panel in a TabPanel
    By SFritsche in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 24, 2010, 6:19 PM
  5. Replies: 0
    Last Post: May 28, 2009, 2:33 PM

Posting Permissions