Jun 10, 2019, 5:05 PM
Get record with pagination
Hello, I have a question, the problem is on line 45, this works perfectly, but the problem is when I want to get record on another page that is not the number 1
<ext:Column ID="clmDiaNumero" runat="server" Text="DÃ*a" DataIndex="DiaNumero" Width="60" Wrap="True">
<Editor>
<ext:DropDownField LabelWidth="120"
ID="_ddfCprDia"
runat="server" Mode="ValueText"
Editable="false">
<Component>
<sdc:grpGridPanelBase ID="_grpCprDia" runat="server" Flex="1" Height="250">
<Store>
<ext:Store
ID="_stoCprDia"
runat="server"
RemoteSort="true"
PageSize="20"
AutoLoad="false">
<Proxy>
<ext:PageProxy DirectFn="#{DirectMethods}.cprcs_Listado_Dias_BindData" />
</Proxy>
<Model>
<ext:Model ID="_mdlCprDia" runat="server" IDProperty="Id" Name="_mdlCprDia">
<Fields>
<ext:ModelField Name="Id" Type="Int" />
<ext:ModelField Name="Numero" Type="Int" />
<ext:ModelField Name="Fecha" Type="Date" />
<ext:ModelField Name="DiaString" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="Numero" Direction="ASC" />
</Sorters>
<Parameters>
<ext:StoreParameter Name="moduloid" Encode="true" Mode="Raw" Value="MainScript.GetSelectedNodeID(#{_trpModulos}, 'id')" />
<ext:StoreParameter Name="cprid" Mode="Raw" Encode="true" Value="#{grpBusquedaResultadosCasoPrueba}.getRowEditor().getActiveRecord().data.Id"></ext:StoreParameter>
</Parameters>
</ext:Store>
</Store>
<ColumnModel ID="_clmdCprDia" runat="server">
<Columns>
<ext:Column ID="clmnCprDiaNumero" runat="server" Text="# Dia" DataIndex="Numero" Width="60" />
<ext:Column ID="clmnCprDiaFecha" runat="server" Text="Fecha" DataIndex="DiaString" Flex="1" />
</Columns>
</ColumnModel>
<Listeners>
<CellClick Handler="DiaPruebaSelect(record);"></CellClick>
</Listeners>
<BottomBar>
<ext:PagingToolbar ID="_pgtCprDia"
runat="server"
DisplayInfo="true"
DisplayMsg="DÃ*as {0} - {1} of {2}"
EmptyMsg="No hay dÃ*as registrados">
</ext:PagingToolbar>
</BottomBar>
<SelectionModel>
<ext:RowSelectionModel Mode="Single" ID="_rsmCprDia">
</ext:RowSelectionModel>
</SelectionModel>
</sdc:grpGridPanelBase>
</Component>
<Listeners>
<Expand Handler="this.picker.setWidth(400); if (this.reload){ #{_rsmCprDia}.deselectAll(true); #{_stoCprDia}.removeAll(); #{_stoCprDia}.loadPage(1); this.reload=false; } " Delay="5" />
<TriggerClick Handler="this.clearValue();" />
</Listeners>
<CustomConfig>
<ext:ConfigItem Name="reload" Value="true" Mode="Raw" />
</CustomConfig>
</ext:DropDownField>
</Editor>
</ext:Column>