1. #1
    Sencha User aswinramakrish's Avatar
    Join Date
    Aug 2011
    Location
    Denver, CO
    Posts
    15
    Vote Rating
    1
    aswinramakrish is on a distinguished road

      0  

    Default Add a filtered store as a grid's store

    Add a filtered store as a grid's store


    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.
    Attached Images

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    549
    Vote Rating
    54
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    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...

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,197
    Vote Rating
    482
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    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.

    Scott.

  4. #4
    Sencha User
    Join Date
    Jul 2012
    Posts
    235
    Vote Rating
    0
    chandan.behura is on a distinguished road

      0  

    Default


    any sample code plz?