[CLOSED] Ext.net v2 Beta release: GridPanel not resized in ViewPort

  1. #1

    [CLOSED] Ext.net v2 Beta release: GridPanel not resized in ViewPort

    Hi!

    In DP1, this page below is correctly sized in browser. Now, in Beta version, the gridPanel appears in middle of browser.

    <%@ Page Language="vb" %>
    <%@ 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">
        <title>Assessoria de Cobrança</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="resManagerDividas" runat="server" />
        <ext:Viewport ID="Viewport1" runat="server">
            <LayoutConfig>
                <ext:VBoxLayoutConfig Align="Stretch" />
            </LayoutConfig>
            <Items>
                <ext:GridPanel runat="server" ID="grdDividas" EnableColumnHide="false" EnableColumnMove="false" Icon="Money" Title="Dívidas" Frame="true" Height="300px"
                    Layout="FitLayout" ButtonAlign="Right" Flex="1">
                    <Store>
                        <ext:Store ID="Store1" runat="server" RemoteSort="true" PageSize="10">
                            <Proxy>
                                <%--<ext:AjaxProxy Json="true" Url="~/App/JSonDataPaging.asmx/CobDividasSGE_DAL">
                                    <ActionMethods Read="POST" />
                                    <Reader>
                                        <ext:JsonReader Root="d.Data" TotalProperty="d.TotalRecords" />
                                    </Reader>
                                </ext:AjaxProxy>--%>
                            </Proxy>
                            <AutoLoadParams>
                                <ext:Parameter Name="start" Value="0" Mode="Raw" />
                                <ext:Parameter Name="limit" Value="10" Mode="Raw"/>
                            </AutoLoadParams>
                            <Parameters>
                                <ext:StoreParameter Name="filter" Value="getDividasFilter()" Mode="Raw" />
                            </Parameters>
                            <Model>
                                <ext:Model ID="Model1" runat="server" IDProperty="ID">
                                    <Fields>
                                        <ext:ModelField Name="ID" />
                                        <ext:ModelField Name="IDDevedor_Nome" />
                                        <ext:ModelField Name="DataCadastro" Type="Date" DateFormat="M$" />
                                        <ext:ModelField Name="NumeroContrato" />
                                        <ext:ModelField Name="NumeroParcela" />
                                        <ext:ModelField Name="DividaValor" Type="Float" />
                                        <ext:ModelField Name="Observacao" />
                                        <ext:ModelField Name="Descricao" />
                                        <ext:ModelField Name="DividaCobranca" Type="Date" DateFormat="M$" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                            <Sorters>
                                <ext:DataSorter Property="ID" Direction="DESC" />
                            </Sorters>
                        </ext:Store>
                    </Store>
                    <ColumnModel ID="ColumnModel1" runat="server">
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="ID" DataIndex="ID" Width="75px" Sortable="true"  />
                            <ext:Column ID="Column2" runat="server" Text="Devedor" DataIndex="IDDevedor_Nome" Width="300px"  Sortable="true"  />
                            <ext:DateColumn ID="DateColumn1" runat="server" Text="Data de Cadastro" DataIndex="DataCadastro" Width="120px"  Sortable="true" Align="Right"  Format="dd/MM/yyyy" />
                            <ext:DateColumn ID="DateColumn2" runat="server" Text="Data de Cobrança" DataIndex="DividaCobranca" Width="120px"  Sortable="true" Align="Right" Format="dd/MM/yyyy" />
                            <ext:Column ID="Column3" runat="server" Text="Contrato Nº" DataIndex="NumeroContrato" Width="85px" Align="Right" Sortable="true"  />
                            <ext:Column ID="Column4" runat="server" Text="Parcela" DataIndex="NumeroParcela" Width="75px" Align="Right" Sortable="true"  />
                            <ext:Column ID="Column5" runat="server" Text="Descrição" DataIndex="Descricao" Width="255px"  Sortable="true"  />
                            <ext:Column ID="Column6" runat="server" Text="Valor" DataIndex="DividaValor" Width="95px" Align="Right" Sortable="true">
                                <Renderer Handler="Ext.util.Format.brMoney(value, null, 2);"  />
                            </ext:Column>
                            <ext:Column ID="Column7" runat="server" Text="Observações" DataIndex="Observacao" Width="200px" Sortable="true"  />
                        </Columns>
                    </ColumnModel>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single"  />
                    </SelectionModel>
                    <View>
                        <ext:GridView ID="viewDividas" runat="server" StripeRows="true" TrackOver="true" />
                    </View>
                    <BottomBar>
                        <ext:PagingToolbar ID="tbPagingDividas" runat="server" DisplayInfo="true"
                            DisplayMsg="Exibindo registros {0} - {1} of {2}" EmptyMsg="Sem registros para exibição">
                            <Items>
                                <ext:Label ID="Label1" runat="server" Text="Registros por página:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="cmbPageSize" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="5" />
                                        <ext:ListItem Text="10" />
                                        <ext:ListItem Text="15" />
                                        <ext:ListItem Text="20" />
                                        <ext:ListItem Text="25" />
                                        <ext:ListItem Text="30" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="10" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{grdDividas}.store.pageSize = parseInt(this.getValue(), 10); #{grdDividas}.store.load({params:{start:0}});" />
                                    </Listeners>
                                </ext:ComboBox>
                            </Items>
                        </ext:PagingToolbar>
                    </BottomBar>
                    <Buttons>
                        <ext:Button runat="server" ID="btnAdd" Icon="ApplicationAdd" Text="Adicionar" />
                        <ext:Button runat="server" ID="btnEdit" Icon="ApplicationEdit" Text="Editar" />
                        <ext:Button runat="server" ID="btnDelete" Icon="ApplicationDelete" Text="Excluir" />
                    </Buttons>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
        <ext:ToolTip
            ID = "RowTipDividas"
            runat = "server"
            XTarget = "={#{grdDividas}.getView().el}"
            Delegate = ".x-grid-cell"
            TrackMouse="true"
            Width="500px"
            Height="100px">
            <Listeners>
                <BeforeShow Handler="showTip(this, #{grdDividas});" />
                <Show Handler="showTip(this, #{grdDividas});" />
            </Listeners>
        </ext:ToolTip>
        <ext:Hidden runat="server" ID="txtIDEmpresa" />
        </form>
    </body>
    </html>
    Last edited by Daniil; Mar 19, 2012 at 2:38 PM. Reason: [CLOSED]
  2. #2
    Please remove Height and Layout for GridPanel
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    Works fine!

    Thanks a lot.

Similar Threads

  1. 2.x Beta Release 2
    By GKG4 in forum 2.x Help
    Replies: 4
    Last Post: May 11, 2012, 11:47 AM
  2. [CLOSED] Ext.net 2v Beta Release: Calendar
    By supera in forum 2.x Premium Help
    Replies: 2
    Last Post: Mar 28, 2012, 11:13 AM
  3. Replies: 6
    Last Post: Mar 26, 2012, 3:08 PM
  4. Replies: 2
    Last Post: Mar 16, 2012, 5:54 PM
  5. Replies: 2
    Last Post: Mar 16, 2012, 5:53 PM

Posting Permissions