1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    2
    Vote Rating
    0
    Office_Dev_Group is on a distinguished road

      0  

    Default Examples loading grids on tab change?

    Examples loading grids on tab change?


    I'm looking for sample code that would demonstrating loading a grid from a database (or really any other server initiated activity) when an ext.js tab change event fires. I'm willing to use either version 3 or version 4...whichever I can get help on quickest!

  2. #2
    Sencha - Support Team slemmon's Avatar
    Join Date
    Mar 2009
    Location
    Boise, ID
    Posts
    4,800
    Vote Rating
    167
    slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold slemmon is a splendid one to behold

      0  

    Default


    If the grid is the tab I'd think you could in your grid config you can set up a listener on tabchange like:
    Code:
     
    ,listeners : {
        tabchange : function(){
            this.store.reload()
        }
    }
    Will that work?

  3. #3
    Sencha User
    Join Date
    Jun 2009
    Posts
    2
    Vote Rating
    0
    Office_Dev_Group is on a distinguished road

      0  

    Default


    I'll try that, thanks

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,620
    Vote Rating
    817
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I would listen for the activate event on the Grid to load the Store. tabchange will be fired on the TabPanel and not the Grid and each tab may not be Grids.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Similar Threads

  1. [1.1.0] examples/forms -> loading.gif
    By tobiu in forum Sencha Touch 1.x: Bugs
    Replies: 0
    Last Post: 28 Mar 2011, 2:17 PM
  2. Weird behavior loading XML (one of the examples)
    By Chamster in forum Ext 2.x: Help & Discussion
    Replies: 7
    Last Post: 9 Jun 2008, 2:50 AM
  3. Replies: 11
    Last Post: 6 Mar 2008, 8:08 PM

Thread Participants: 2