PDA

View Full Version : Filtering on Proxy store



dagor
6 May 2014, 11:39 PM
Hello,

A colleague of mine is working on a grid component in Ext 4.2.x. The grid has a paginated functionality and works pretty well. Fast and nice. But with a lot of records loaded in, it is handy to have a filter functionality.

There is a filter in the Grif component. This one works only on the grid, but we want a filter that works on the store. My colleague found a way to trigger a filter method, the result of this method is exactly what we want:


grids.getStore().filter('personid',/1222.*/);
pageidtoolbar.doRefresh();

If he puts that in the console, the grid will filter just like we want to. However, the information on the screen like: total records and total pages doesn't get updated. Plus, the filter functionality in the grid does not respond to the console method.

Is there a way to fix my problems? To summarize what I want:
- Working paginated grid
- Working filter mechanism on the complete proxy store
- When filtering, the paginate toolbar must be updated to the filtered results. Not to the total results.
- UI Filter mechanism updated

I hope someone can help us!

Thanks in advance!

Sincerely,
Guido Visser

dagor
8 May 2014, 11:46 PM
It's been 2 days since I've posted this forum thread, since then no response yet.

Is there anybody who can help me with this?

Thanks in advance,
Guido Visser

Gary Schlosberg
9 May 2014, 6:50 AM
Is the store local? If so you might have a look near the bottom of the pagingtoolbar doc page at the Paging with Local Data section.
http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.toolbar.Paging

jsakalos
9 May 2014, 11:19 PM
Try to set remoteFilter:true on the store.

dagor
11 May 2014, 11:34 PM
Thanks for replying! We have a local store and a memory proxy. Remote filtering is not an option.Shouldn't this be easy an easy task for such a big package as ExtJS?Sincerely,Guido Visser

jsakalos
12 May 2014, 1:47 AM
Then you need paging memory proxy: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.ux.data.PagingMemoryProxy