PDA

View Full Version : [CLOSED] My filter doesn't works with pagination plugin in a GridPanel



osef
Jul 31, 2015, 6:47 PM
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


<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(newValu e.toUpperCase()) > -1) {
return true;
}
else {
return false;
}
}
}]);
App.gpOrdenesEstimaciones.getSelectionModel().dese lectAll();
};




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>

fabricio.murta
Aug 01, 2015, 8:53 AM
Hello @Osef!

The reason I can see for this to break would be when you do remote paging. Else, that could be an incompatibility between the pager and the search plugins.

Can you make us a running sample to reproduce your issue?

If in doubt on how to come up with a simple runnable example, please refer to these posts:
- Forum Guidelines For Posting New Topics (http://forums.ext.net/showthread.php?3440)
- More information required (http://forums.ext.net/showthread.php?10205)

Hope to hear back from you soon!

osef
Aug 10, 2015, 2:49 PM
Thanks, please close this thread, I need this property in the Store <"RemoteSort="true">

Thanks a lot