1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    2
    Vote Rating
    0
    phreakbox is on a distinguished road

      0  

    Default AutoRefreshing Grid?

    AutoRefreshing Grid?


    Hello,

    I want autorefreshing (ex. every 1 minutes) on GridPanel:

    GridPanel code:
    PHP Code:
    var = new Ext.grid.GridPanel({
                    
    storestore,
                    
    columns: [
                        
                        {
    header'numbs'width100sortabletruedataIndex'name'},
                        {
    header'txt'width100sortabletruedataIndex'position'},
                        {
    header'dt'width250sortabletruedataIndex'ambition'}            
                    ],
                    
    stripeRowstrue,
                    
    height:250,
                    
    width:400,
                    
    collapsible:true,
                    
    region:'west',
                    
    splittrue,
                    
    title:'newnumb',
                    
    trackMouseOvertrue,
                    
    autoloadtrue,
                        
                        
    bbar: new Ext.PagingToolbar({
                            
    pageSize10,    // data to display
                            
    storestore,
                            
    displayInfotrue,
                            
    displayMsg'Show {0} - {1} / {2}',
                            
    emptyMsg"-"            
                        
    })
                    }); 
    In New.Viewport I have this in items:
    PHP Code:
    w.show() 

  2. #2
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277
    Vote Rating
    9
    troseberry will become famous soon enough

      0  

    Default


    take a look at the Ext.TaskMgr class

  3. #3
    Ext User
    Join Date
    Sep 2010
    Posts
    2
    Vote Rating
    0
    phreakbox is on a distinguished road

      0  

    Default


    It doesn't work. Show me example solution. I want autoreload w.show() function in viewport code:
    Code:
    new Ext.Viewport({
            layout: 'border',
            defaults: {
                height: 90,
                width: 150
            },
            items: [
                {
                    title: 'titletest',
                    region: 'center',
                    /*autoLoad: {url: 'fetchnew.php', scope: this},*/
                    split: true,
                    layout: 'auto',
                   
                    items: [{
                            title: 'first',
                            html: 'The first tab\'s content. Others may be added dynamically',
                            border: true,
                            split: true,
                            collapsible: true
                        },
                        {
                            title: 'second',
                            html: 'The first tab\'s content. Others may be added dynamically',
                            border: true,
                            split: true,
                            collapsible: true
                        }
                        ]
    
                },
                {
                    title: 'Status',
                    region: 'south',
                    split: true,
                    collapsible: true
                },
                w.show(),
               
                {
                    title: 'Easst',
                    region: 'east',
                    split: true,
                    collapsible: true
                }
            ]
        });
    And GridPanel is shown:

    PHP Code:
    var = new Ext.grid.GridPanel({
                    
    storestore,
                    
    columns: [
                       
                        {
    header'numbs'width100sortabletruedataIndex'name'},
                        {
    header'tyt'width100sortabletruedataIndex'position'},
                        {
    header'dt'width250sortabletruedataIndex'ambition'}           
                    ],
                    
    stripeRowstrue,
                    
    height:250,
                    
    width:400,
                    
    collapsible:true,
                    
    region:'west',
                    
    splittrue,
                    
    title:'Novi brojevi',
                    
    trackMouseOvertrue,
                    
    autoloadtrue,
                    
    interval1000,
                       
                        
    bbar: new Ext.PagingToolbar({
                            
    pageSize10,    // data to display
                            
    storestore,
                            
    displayInfotrue,
                            
    displayMsg'Show {0} - {1} / {2}',
                            
    emptyMsg"-"           
                        
    })
                    }); 

  4. #4
    Ext JS Premium Member troseberry's Avatar
    Join Date
    Feb 2010
    Location
    Dayton, OH
    Posts
    277
    Vote Rating
    9
    troseberry will become famous soon enough

      0  

    Default


    Here try this.
    Code:
    var west = new Ext.grid.GridPanel({
     store:  new Ext.data.SimpleStore({
      autoDestroy: true,
      autoLoad: true,
      data: [['Bob', 'CEO', 'Good']],
      fields: ['name', 'position', 'ambition']
     }),
     columns: [
      {header: 'numbs', width: 100, sortable: true, dataIndex: 'name'},
      {header: 'tyt', width: 100, sortable: true, dataIndex: 'position'},
      {header: 'dt', width: 250, sortable: true, dataIndex: 'ambition'}           
     ],
     stripeRows: true,
     margins: '0 0 0 0',
     height:250,
     width:400,
     collapsible:true,
     region:'west',
     split: true,
     title:'Novi brojevi'
    });  
     
    Ext.onReady(function(){
     var vp = new Ext.Viewport({
      layout: 'border',
      items: [{
       title: 'titletest',
       region: 'center',
       /*autoLoad: {url: 'fetchnew.php', scope: this},*/
       margins: '0 0 0 0',
       layout: 'fit',
       items: []
      },
      west]
     });
     
     var task = {
      run: function(){
       // Reload the grid's store
       //west.store.reload();
       // Refresh the grid's view
       west.getView().refresh();
       console.log("I just refreshed the Grid View");
      },
      interval: 5000 // Every 5 seconds the grid's view will refresh.
     }
    Ext.TaskMgr.start(task);
     
    });

Similar Threads

  1. AutoRefreshing JSonViews
    By javajunky in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 20 Jun 2007, 7:55 AM

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."