PDA

View Full Version : Filter does not go back to page 1



jimtyp
17 Sep 2009, 2:20 PM
I have a paged grid with filtering. If I page to say page 9, then select a filter, which filters down to 1 page, the "start" value I get on the server is still where it was while at page 9. So for example, it will say page 9 of 1 - and no data displayed. Very confusing for the users.

Can I get the "start" to reset back to 1 when filtering? Or is there another simple solution?

httpdotcom
17 Sep 2009, 8:06 PM
store.on( "beforeload", function( s,o ) { s.setBaseParam( "start",0 ) ; } ) ; YMMV...

jimtyp
18 Sep 2009, 7:12 AM
Thank you for the reply, but it didn't work. The "start" value is still what it was before the filter was applied.

jimtyp
18 Sep 2009, 8:36 AM
Ah, got it. The paging toolbar was missing the filter plugin, so the paging toolbar wasn't aware of the filter.

bbar : new Ext.PagingToolbar(
{
pageSize : 25,
store : userStore,
displayInfo : true,
displayMsg : 'Supervisors {0} - {1} of {2}',
emptyMsg : "No Supervisors to display",
plugins: [filters]

}
)