Jan 20, 2012, 6:34 PM
[CLOSED] GridPanel PagingToolbar Navigation Problem
I has a gridPanel called grdSugestoes in my aspx page. See the code of my gridPanel for details with Store, PagingToolbar, etc... just below in the thread...
The store call a WebService, and this WebService returns a paging records, follow this exemple
https://examples2.ext.net/#/GridPane...ON_WebService/
So my grid is started with 5 records oft 345... its working fine
Attachment 3749
I move to last page... it´s working fine too...
Attachment 3750
When I change a pagesize to 20 in combobox (I inserted a combobox follow this exemple https://examples2.ext.net/#/GridPane...rayWithPaging/), no records are returned...
Where am I wrong? is there anything I can do for this paging function properly?
The store call a WebService, and this WebService returns a paging records, follow this exemple
https://examples2.ext.net/#/GridPane...ON_WebService/
So my grid is started with 5 records oft 345... its working fine
Attachment 3749
I move to last page... it´s working fine too...
Attachment 3750
When I change a pagesize to 20 in combobox (I inserted a combobox follow this exemple https://examples2.ext.net/#/GridPane...rayWithPaging/), no records are returned...
Where am I wrong? is there anything I can do for this paging function properly?
<ext:GridPanel runat="server" ID="grdSugestoes" Title="Sugestões" Frame="true" Layout="FitLayout" IconCls="icon-sugestoes" ButtonAlign="Right" Flex="3">
<Store>
<ext:Store ID="Store1" runat="server" RemoteSort="true" PageSize="10">
<Proxy>
<ext:AjaxProxy Json="true" Url="~/App/JSonDataPaging.asmx/Sugestoes_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="getFilter()" Mode="Raw" />
</Parameters>
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="IDSugestao" />
<ext:ModelField Name="Data" Type="Date" DateFormat="M$" />
<ext:ModelField Name="Descricao" />
<ext:ModelField Name="Tipo" />
<ext:ModelField Name="IDStatusDesenvolvimento_Descricao" />
<ext:ModelField Name="Situacao" />
<ext:ModelField Name="Solicitante" />
<ext:ModelField Name="SolicitanteEmail" />
<ext:ModelField Name="IDCronograma_Descricao" />
<ext:ModelField Name="DataSolucao" Type="Date" DateFormat="M$"/>
<ext:ModelField Name="Solucao" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="IDSugestao" Direction="DESC" />
</Sorters>
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column
runat="server"
ColumnID="Details"
Header=""
DataIndex=""
Width="30"
Align="Center"
Fixed="true"
MenuDisabled="true"
Resizable="false">
<Renderer Fn="sugestaoDetailsRender"/>
</ext:Column>
<ext:Column runat="server" Text="ID" DataIndex="IDSugestao" Width="75px" Sortable="true" />
<ext:DateColumn runat="server" Text="Data" DataIndex="Data" Width="75px" Sortable="true" Format="dd/MM/yyyy" />
<ext:Column runat="server" Text="Descrição" DataIndex="Descricao" Width="300px" Sortable="true" />
<ext:Column runat="server" Text="Tipo" DataIndex="Tipo" Width="100px" Sortable="true" />
<ext:Column runat="server" Text="Status do Desenvolvimento" DataIndex="IDStatusDesenvolvimento_Descricao" Width="150px" Sortable="true" />
<ext:Column runat="server" Text="Situação" DataIndex="Situacao" Width="100px" Sortable="true" />
<ext:Column runat="server" Text="Solicitante" DataIndex="Solicitante" Width="100px" Sortable="true" />
<ext:Column runat="server" Text="E-mail do Solicitante" DataIndex="SolicitanteEmail" Width="120px" Sortable="true" />
<ext:Column runat="server" Text="Cronograma" DataIndex="IDCronograma_Descricao" Width="120px" Sortable="true" />
<ext:DateColumn runat="server" Text="Corrigido em" DataIndex="DataSolucao" Width="75px" Format="dd/MM/yyyy" Sortable="true" />
<ext:Column runat="server" Text="Solução" DataIndex="Solucao" Width="300px" Sortable="true" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" mode="Single" />
</SelectionModel>
<BottomBar>
<ext:PagingToolbar ID="tbPagingSugestoes" runat="server" DisplayInfo="true"
DisplayMsg="Exibindo sugestões {0} - {1} of {2}" EmptyMsg="Sem sugestões para exibição">
<Items>
<ext:Label ID="Label1" runat="server" Text="Page size:" />
<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="20" />
<ext:ListItem Text="30" />
</Items>
<SelectedItems>
<ext:ListItem Value="10" />
</SelectedItems>
<Listeners>
<Select Handler="#{grdSugestoes}.store.pageSize = parseInt(this.getValue(), 10); #{grdSugestoes}.store.load();" />
</Listeners>
</ext:ComboBox>
</Items>
</ext:PagingToolbar>
</BottomBar>
<Listeners>
<CellClick Fn="cellClick" />
<CellDblClick/>
</Listeners>
<DirectEvents>
<CellClick
OnEvent="ShowDetails"
Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{grdSugestoes}.body}" />
</CellClick>
<CellDblClick
OnEvent="ShowDetails"
Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{grdSugestoes}.body}" />
</CellDblClick>
</DirectEvents>
<Buttons>
<ext:Button runat="server" ID="btnAdd" Icon="ApplicationAdd" Text="Adicionar">
<DirectEvents>
<Click OnEvent="AddSugestao"
Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{grdSugestoes}.body}" />
</Click>
</DirectEvents>
</ext:Button>
<ext:Button runat="server" ID="btnDetails" Icon="ApplicationEdit" Text="Detalhar">
<DirectEvents>
<Click OnEvent="ShowDetails"
Failure="Ext.MessageBox.alert('Load failed', 'Error during ajax event!');">
<EventMask ShowMask="true" Target="CustomTarget" CustomTarget="={#{grdSugestoes}.body}" />
</Click>
</DirectEvents>
</ext:Button>
</Buttons>
</ext:GridPanel>
Last edited by Daniil; Jan 23, 2012 at 2:55 PM.
Reason: [CLOSED]