GridPanel resize problem

  1. #1

    GridPanel resize problem

    Hi, i have issue about gridPanel in resize window.

    See my code and images to understand

    <ext:Window ID="Window1" runat="server" Title="Título" Width="900" Height="500" AutoShow="false"
        Modal="true" Layout="Fit" Maximizable="true" Closable="true" Hidden="true" AutoScroll="true"
        MonitorResize="true">
        <Items>
            <ext:Panel ID="Panel2" runat="server" Padding="5" Height="500" LabelAlign="Top" Width="900"
                Layout="Fit">
                <Items>
                    <ext:BorderLayout ID="BorderLayout3" runat="server">
                        <West Split="true" CollapseMode="Mini">
                            <ext:Panel ID="Panel3" runat="server" Width="320">
                                <Content>
                                    <ext:Panel ID="Panel8" runat="server" Height="320" LabelWidth="0" Border="false"
                                        Title="DADOS DO CONTRIBUINTE" Icon="UserMagnify" Padding="10">
                                        <Items>
                                            <ext:Label ID="Label9" runat="server" Html="<b>IE</b><br/>" />
                                            <ext:Label ID="Label11" runat="server" Text="." />
                                            <ext:Label ID="Label13" runat="server" Html="<br/><br/><b>CNPJ/CPF</b><br/>" />
                                            <ext:Label ID="Label14" runat="server" Text="." />
                                            <ext:Label ID="Label15" runat="server" Html="<br/><br/><b>Razão Social</b><br/>" />
                                            <ext:Label ID="Label16" runat="server" Text="." />
                                            <ext:Label ID="Label17" runat="server" Html="<br/><br/><b>Endereço</b><br/>" />
                                            <ext:Label ID="Label18" runat="server" Text="." />
                                            <ext:Label ID="Label19" runat="server" Html="<br/><br/><b>Telefone</b><br/>" />
                                            <ext:Label ID="Label20" runat="server" Text="." />
                                            <ext:Label ID="Label21" runat="server" Html="<br/><br/><br/><b>Status</b><br/>" />
                                            <ext:Label ID="Label22" runat="server" Text="." />
                                            <ext:Panel ID="Panel9" runat="server" Width="330" Height="32" Border="false" StyleSpec='margin-top:5px; margin-right:5px;'>
                                                <Content>
                                                    <ext:LinkButton ID="LinkButton1" runat="server" Text="Cadastro">
                                                        <Listeners>
                                                            <Click Handler="window.open('../../ExtratoFAC_V2.aspx?ruc='+ #{txtIE}.getValue() +'&secao=1,2,6', 'BrowserWindow_1495440923', 'menubar=0,toolbar=0,status=0,scrollbars=1,location=0,resizable=1,top=40,left=40,height=600,width=822');" />
                                                        </Listeners>
                                                    </ext:LinkButton>
                                                    |
                                                    <ext:LinkButton ID="LinkButton2" runat="server" Text="Conta Corrente">
                                                        <Listeners>
                                                            <Click Handler="window.open('../../tax.net.ctacte/vit_consultaperiodosctacte.aspx?RUC='+ #{txtIE}.getValue() , 'BrowserWindow_1495440923', 'menubar=0,toolbar=0,status=0,scrollbars=1,location=0,resizable=1,top=40,left=40,height=600,width=822');" />
                                                        </Listeners>
                                                    </ext:LinkButton>
                                                    |
                                                    <ext:LinkButton ID="LinkButton3" runat="server" Text="Processos">
                                                        <Listeners>
                                                            <Click Handler="window.open('../../tax.Net.GestaoFluxoTrabalho/GFT_EstadoProceso.aspx?apli=FIS&IE='+ #{txtIE}.getValue() , 'BrowserWindow_1495440923', 'menubar=0,toolbar=0,status=0,scrollbars=1,location=0,resizable=1,top=40,left=40,height=600,width=822');" />
                                                        </Listeners>
                                                    </ext:LinkButton>
                                                    |
                                                    <ext:LinkButton ID="LinkButton4" runat="server" Text="TTD">
                                                        <Listeners>
                                                            <Click Handler="window.open('../../tax.net.ttd/consulta/CompletaConcessao.aspx?ie='+ #{txtIE}.getValue() +'&sit=1', 'BrowserWindow_1495440923', 'menubar=0,toolbar=0,status=0,scrollbars=1,location=0,resizable=1,top=40,left=40,height=600,width=822');" />
                                                        </Listeners>
                                                    </ext:LinkButton>
                                                </Content>
                                            </ext:Panel>
                                        </Items>
                                    </ext:Panel>
                                    <ext:Panel ID="Panel10" runat="server" Border="false" Title="DOCUMENTOS DE FISCALIZAÇÃO"
                                        Icon="PageWhiteStack" Padding="10">
                                        <Content>
                                            <ext:CompositeField ID="CompositeField6" runat="server" Height="20">
                                                <Items>
                                                    <ext:LinkButton ID="LinkButton5" runat="server" Text="Termo de Início de Fiscalização">
                                                        <DirectEvents>
                                                            <Click ViewStateMode="Enabled" OnEvent="lnkTermoInicioFisc_Click">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:LinkButton>
                                                </Items>
                                            </ext:CompositeField>
                                            <ext:CompositeField ID="CompositeField7" runat="server" Height="20" Cls="labelTexto">
                                                <Items>
                                                    <ext:LinkButton ID="LinkButton6" runat="server" Text="Infração Fiscal">
                                                        <DirectEvents>
                                                            <Click ViewStateMode="Enabled" OnEvent="lnkInfracaoFiscal_Click">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:LinkButton>
                                                </Items>
                                            </ext:CompositeField>
                                            <ext:CompositeField ID="CompositeField11" runat="server" Height="20" Cls="labelTexto">
                                                <Items>
                                                    <ext:LinkButton ID="LinkButton7" runat="server" Text="Termo de Intimação p/ Def. Prévia">
                                                        <DirectEvents>
                                                            <Click ViewStateMode="Enabled" OnEvent="lnkTermoIntimacaoDefPrevia_Click">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:LinkButton>
                                                </Items>
                                            </ext:CompositeField>
                                            <ext:CompositeField ID="CompositeField12" runat="server" Height="20" Cls="labelTexto">
                                                <Items>
                                                    <ext:LinkButton ID="LinkButton8" Disabled="true" runat="server" Text="Notificação Fiscal">
                                                        <DirectEvents>
                                                            <Click ViewStateMode="Enabled" OnEvent="lnkNotifFiscal_Click">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:LinkButton>
                                                </Items>
                                            </ext:CompositeField>
                                            <ext:CompositeField ID="CompositeField13" runat="server" Height="20" Cls="labelTexto">
                                                <Items>
                                                    <ext:LinkButton ID="LinkButton9" Disabled="true" runat="server" Text="Termo de Encerramento">
                                                        <DirectEvents>
                                                            <Click ViewStateMode="Enabled" OnEvent="lnkTermoEncerramento_Click">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:LinkButton>
                                                </Items>
                                            </ext:CompositeField>
                                        </Content>
                                    </ext:Panel>
                                </Content>
                            </ext:Panel>
                        </West>
                        <Center>
                            <ext:Panel ID="Panel12" runat="server" Border="true" Padding="10" AutoScroll="true"
                                MonitorResize="true">
                                <Items>
                                    <ext:Panel ID="Panel13" runat="server" Border="false" LabelAlign="Right" AutoWidth="true"
                                        Cls="topBar_Panels">
                                        <TopBar>
                                            <ext:Toolbar ID="Toolbar7" HideBorders="true" AutoWidth="true" Cls="topBar_Panels"
                                                runat="server" StyleSpec="margin-bottom: 5px; margin-right: 10px;">
                                                <Items>
                                                    <ext:Button ID="Button3" runat="server" Text="Anterior" Icon="ArrowLeft" StandOut="true"
                                                        StyleSpec="margin-right: 10px;">
                                                        <DirectEvents>
                                                            <Click OnEvent="btnAnterior_Click" ViewStateMode="Enabled">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:Button>
                                                    <ext:Button ID="Button7" runat="server" Text="Próximo" Icon="ArrowRight" StandOut="true"
                                                        IconAlign="Right">
                                                        <DirectEvents>
                                                            <Click OnEvent="btnProximo_Click" ViewStateMode="Enabled">
                                                                <EventMask ShowMask="true" />
                                                            </Click>
                                                        </DirectEvents>
                                                    </ext:Button>
                                                </Items>
                                            </ext:Toolbar>
                                        </TopBar>
                                        <Items>
                                        </Items>
                                        <BottomBar>
                                            <ext:Toolbar ID="Toolbar8" runat="server" AutoWidth="true" Cls="topBar_Panels" StyleSpec="border-top-color: white;">
                                                <Items>
                                                    <ext:Button runat="server" ID="Button8" Text="Registrar gestão" Icon="DoorIn" AutoWidth="True"
                                                        StandOut="true" StyleSpec="margin-right: 10px;">
                                                    </ext:Button>
                                                    <ext:Button runat="server" ID="Button9" Text="Aceitar defesa prévia" Icon="ThumbUp"
                                                        AutoWidth="True" StandOut="true" StyleSpec="margin-right: 10px;">
                                                    </ext:Button>
                                                    <ext:Button runat="server" ID="Button10" Text="Denegar defesa prévia" Icon="ThumbDown"
                                                        AutoWidth="True" StandOut="true">
                                                    </ext:Button>
                                                </Items>
                                            </ext:Toolbar>
                                        </BottomBar>
                                    </ext:Panel>
                                    <ext:GridPanel runat="server" ID="GridPanel1" AutoScroll="true" Height="135" AutoExpandColumn="Assunto"
                                        Collapsible="true" StyleSpec='margin:10px auto;' Title="Avisos">
                                        <Store>
                                            <ext:Store ID="store1" runat="server">
                                                <Reader>
                                                    <ext:JsonReader>
                                                        <Fields>
                                                            <ext:RecordField Name="DataEnvio" />
                                                            <ext:RecordField Name="DescricaoTipo" />
                                                            <ext:RecordField Name="Assunto" />
                                                            <ext:RecordField Name="DescricaoStatusPagamento" />
                                                            <ext:RecordField Name="DescricaoStatusLido" />
                                                        </Fields>
                                                    </ext:JsonReader>
                                                </Reader>
                                            </ext:Store>
                                        </Store>
                                        <ColumnModel>
                                            <Columns>
                                                <ext:Column Header="Data" Width="130" DataIndex="DataEnvio" />
                                                <ext:Column Header="Tipo" Width="150" DataIndex="DescricaoTipo" />
                                                <ext:Column Header="Assunto" Width="80" DataIndex="Assunto" />
                                                <ext:ImageCommandColumn Header="Lido" Align="Center" Width="40" Css="CentralizaLink"
                                                    DataIndex="DescricaoStatusLido">
                                                    <Commands>
                                                        <ext:ImageCommand Icon="Tick" CommandName="StatusLido" />
                                                    </Commands>
                                                    <PrepareCommand Fn="prepareCommand" />
                                                </ext:ImageCommandColumn>
                                            </Columns>
                                        </ColumnModel>
                                        <SelectionModel>
                                            <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" />
                                        </SelectionModel>
                                    </ext:GridPanel>
                                </Items>
                            </ext:Panel>
                        </Center>
                    </ext:BorderLayout>
                </Items>
            </ext:Panel>
        </Items>
    </ext:Window>
    Before resize:

    Click image for larger version. 

Name:	antes.jpg 
Views:	142 
Size:	48.6 KB 
ID:	2994

    After resize:

    Click image for larger version. 

Name:	depois.jpg 
Views:	147 
Size:	55.0 KB 
ID:	2995
  2. #2
    Hi,

    It's not a bug, it's a wrong layout.

    Please try this:

    1. Set up Layout="vbox" for the Panel12

    2. Set up this LayoutConfig for the Panel12
    <LayoutConfig>
        <ext:VBoxLayoutConfig Align="Stretch" />
    </LayoutConfig>
    3. Set up Flex="1" for the Panel13

    4. Remove AutoWidth="true" of the Panel13
  3. #3
    Perfect!!
    Please mark as solved.

    Thank you Danii.

Similar Threads

  1. Ext.net 2.0 Beta 3 of the window Resize problem
    By SeoNamseok in forum 2.x Help
    Replies: 0
    Last Post: May 31, 2012, 4:22 AM
  2. GridPanel resize problem
    By ozlemp in forum 1.x Help
    Replies: 3
    Last Post: May 26, 2011, 7:35 PM
  3. [CLOSED] Problem with Gridpanel and Viewport on browser resize
    By John_Writers in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: May 10, 2011, 10:44 AM
  4. [CLOSED] [1.0] Major resize problem!!!
    By reinout.mechant@imprss.be in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 24, 2010, 12:57 PM
  5. [CLOSED] IE6 Rendering (resize) problem
    By MarcA in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Oct 01, 2009, 7:03 AM

Posting Permissions