Problem with GridFilters
I post here because I have a problem with the GridFilters plugin.
I have a "bug" when i am at a page different of the first page.
For example, if i'm at the 7th page.
When I add a filter .. I stay at the 7th page but the result is at the first page.
How can i do to rewind to the first page if i apply a filter ?
Ext JS Premium Member
I had the same problem, easy fix, but was really hard to figure out originally. Can't believe no one has helped you with this yet. Just in case you still need it, or anyone else needs it, here it is:
var currentPageNumber = tb.readPage();
var maximumPageNumber = Math.floor(tb.store.getTotalCount() / tb.pageSize) + 1;
if(currentPageNumber > maximumPageNumber)
where yourgrid is the grid
and tb is the Ext.PagingToolbar in the grid
I don't know if this will work for Ext 2.0, but it definately works for 3.2.1