Results 1 to 4 of 4

Thread: common grid

  1. #1

    Default common grid

    Hi,
    How to make a grid common for all tabs of a tab panel but the data of the grid should vary according to the tab selected.

    please any hints/sample code.

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,409

    Default

    This was just discussed in another thread today:
    http://www.sencha.com/forum/showthread.php?236927

    The question is .. do you want to have actually have duplicate grids for the same store in tabs displaying filtered data based on the tab selection?

    Scott.

  3. #3
    Sencha Premium Member tempvalue's Avatar
    Join Date
    Apr 2012
    Location
    Nyon
    Posts
    25

    Default

    I thing you have two options:
    1)If you want to keep your grid, and apply a filter according to tab selected:

    First initialize your grid store
    Then add a listener that is called whenever a tab is changed to your tabpanel.
    In that listener, use parameter that shows which tab that you selected to filter your store.
    Finally add a new grid panel into each tabpanel item with same store.

    2)If you want to create different grids, then in first step initialize store for each different grid. You dont need to add any listeners since each tab will show a totally different grid independent of another.

  4. #4

    Default

    Quote Originally Posted by tempvalue View Post
    I thing you have two options:
    1)If you want to keep your grid, and apply a filter according to tab selected:

    First initialize your grid store
    Then add a listener that is called whenever a tab is changed to your tabpanel.
    In that listener, use parameter that shows which tab that you selected to filter your store.
    Finally add a new grid panel into each tabpanel item with same store.

    2)If you want to create different grids, then in first step initialize store for each different grid. You dont need to add any listeners since each tab will show a totally different grid independent of another.
    have u any sample code?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •