Jul 31, 2015, 6:47 PM
[CLOSED] My filter doesn't works with pagination plugin in a GridPanel
Hello team:
I have a issue with a GridPanel.
I have a filter in one textfield in headerItems in my GridPanel with a function in Javascript in the Change event to filter results in my store, it works perfect, but when I put the pagination plugin in the gridpanel, it works perfect too, but my filter in the textfield doesn´t works anymore. Any idea?
Thanks so much
This is my column
This is the pagionation plugin:
I have a issue with a GridPanel.
I have a filter in one textfield in headerItems in my GridPanel with a function in Javascript in the Change event to filter results in my store, it works perfect, but when I put the pagination plugin in the gridpanel, it works perfect too, but my filter in the textfield doesn´t works anymore. Any idea?
Thanks so much
This is my column
<ext:Column
ID="cReporte"
runat="server"
Text="REPORTE"
Align="Center"
Width="110"
DataIndex="Reporte">
<Renderer Fn="cReporte_Renderer" />
<HeaderItems>
<ext:TextField
ID="txtReporte"
EmptyText="Busca"
runat="server">
<Listeners>
<Change Fn="txtReporteFiltro_Change" />
</Listeners>
</ext:TextField>
</HeaderItems>
</ext:Column>
This is my filter function://Evento que hace el filtro al seleccionar algun elemento
var txtReporteFiltro_Change = function (textfield, newValue, oldValue, e) {
App.sOrdenesEstimaciones.clearFilter();
App.sOrdenesEstimaciones.filter([{ filterFn: function (item) {
if (item.get('Reporte').toUpperCase().indexOf(newValue.toUpperCase()) > -1) {
return true;
}
else {
return false;
}
}
}]);
App.gpOrdenesEstimaciones.getSelectionModel().deselectAll();
};
This is the pagionation plugin:
<BottomBar>
<ext:PagingToolbar ID="PagingToolbar1" runat="server">
<Items>
<ext:Label ID="Label1" runat="server" Text="Tamaño página:" />
<ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
<ext:ComboBox ID="ComboBox2" runat="server" Width="80">
<Items>
<ext:ListItem Text="1" />
<ext:ListItem Text="2" />
<ext:ListItem Text="10" />
<ext:ListItem Text="20" />
</Items>
<SelectedItems>
<ext:ListItem Value="10" />
</SelectedItems>
<Listeners>
<Select Handler="#{gpOrdenesEstimaciones}.store.pageSize = parseInt(this.getValue(), 10); #{gpOrdenesEstimaciones}.store.reload();" />
</Listeners>
</ext:ComboBox>
</Items>
<Plugins>
<ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
</Plugins>
</ext:PagingToolbar>
</BottomBar>
Last edited by Daniil; Aug 11, 2015 at 3:30 PM.
Reason: [CLOSED]