View Full Version : Grid with Paging & Filters: Paging does not happen after clearing filters

Oct 19, 2017, 8:59 AM
Ext.Net version: 4.5.0

When a store has both paging and grouping, and a filter is added and removed, the paging is not applied anymore (all records are shown on the first page).

This page demonstrates the issue:

<%@ Page Language="C#" %>
<%@ Register TagPrefix="ext" Assembly="Ext.Net" Namespace="Ext.Net" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<form id="form1" runat="server">
<ext:ResourceManager runat="server" />
<ext:GridPanel runat="server" BufferedRenderer="false">
<ext:Toolbar runat="server">
<ext:Button runat="server" OnClientClick="addFilter();" Text="Add filter" />
<ext:Button runat="server" OnClientClick="clearFilter();" Text="Clear filter" />
<ext:Button runat="server" OnClientClick="getStore().loadPage(1);" Text="loadPage(1)" />
<ext:ToolbarTextItem runat="server" Html="PageSize: 50"></ext:ToolbarTextItem>
<ext:Store runat="server" ID="MyStore" PageSize="50">
<ext:Model runat="server">
<ext:ModelField Name="Group" />
<ext:ModelField Name="Val" />
<ext:Grouping runat="server" />
<ext:Column runat="server" DataIndex="Val" />
<ext:PagingToolbar runat="server" />

Ext.onReady(function () {
var store = getStore();
var data = [];
for (var i = 0; i < 1000; i++) {
data.push({ Group: Math.floor(i / 10), Val: i });

function getStore() {
return <%=MyStore.ClientID%>;

function addFilter() {
getStore().filterBy(function (x) {
return x.data.Val < 20;

function clearFilter() {

When the page loads, 50 records (out of 1000 in the store) are shown on the first page. Then click the "Add filter" button. The filter will only accept the first 20 records. Finally, click "Clear filter". Now all 1000 records are shown on the first page. You have to manually call "loadPage(1)" again to fix the paging.

Additional information:

This only happens when the store is grouped.
Simply calling "loadPage(1);" after clearing the filter is not an acceptable solution for us, because our grid contains many columns and rows, so the performance penalty of showing all records between the clearFilter() and loadPage(1) is too big.
We cannot use a buffered renderer either, because of this issue: https://www.sencha.com/forum/showthread.php?335661-Buffered-renderer-and-grouping-feature-of-grid-cause-scroll-issues-when-used-together

Best regards,