View Full Version : Add a filtered store as a grid's store

13 Aug 2012, 5:24 AM
I'm trying to reuse a grid under different tabs.

Is there a way I can have one centralized store for that grid and show data under different tabs based on a filter?
In other words, can I add a store to a grid with a data filter via designer / in the event handler.

I'm using Ext JS: 3.4 (if it helps)

Here is a snapshot of what I'm looking for.

13 Aug 2012, 8:25 AM
Using tabs seems a strange choice when you're basically aiming to continue viewing the same grid, but filter a store / change the displayed results by clicking each tab? Could you not instead have one grid, and then have a toptoolbar with buttons to filter it differently?

Of course, if you MUST use the tabbed layout - then you could simply add an identical grid under each of the tabs, which are all hooked up to the same store. Then simply tap into the tab "activate" event listener and filter the store as required...

13 Aug 2012, 8:56 AM
I would also suggest using 1 grid with menu/button options to provide 'quick views' instead of creating multiple instances. Seem like a lot of overhead to simply display unique data.


15 Aug 2012, 9:13 AM
any sample code plz?