View Full Version : Grid, current page and new totalRecords

31 Jan 2013, 5:19 AM
I have some problem with paging at grid with remote filtering.

Grid has 1000 records.
Page size is 100.
User moves to page number 2.
User applies some external (not grid member) filter.
User press refresh button at paging bar.
Store applies filter data by code

listeners:{ beforeLoad: function (store){
store.getProxy().extraParams.query = Ext.ComponentManager.get("vendorfilter").value;

Server-side script build new query and generate response with 56 records.
But page is 2, There is no page 2 now!
Well, server can send empty page or last page.
If server send empty recordset, paging bar is disabled.
If server send last page, paging bar looks funny
"page 7 from 1" and "Displaying 101-56 of 56"

4 Feb 2013, 9:11 AM
You can use loadPage method on the store to specify to go to page 1

4 Feb 2013, 8:51 PM
You are right.
I have solved this problem by event.
But I guess store (or/and grid or/and paging panel) should to know about new totalRecords from last package.

Thank you.