1. #1
    Ext User border9's Avatar
    Join Date
    Aug 2007
    Posts
    269
    Vote Rating
    0
    border9 is on a distinguished road

      0  

    Default Grid Auto Refresh

    Grid Auto Refresh


    Im having issues locating a good resource, to make my grid auto refresh every 20 - 25 seconds. Does anyone have any good ideas pretaining to that issue?

    Thanks

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    80
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    You can use task manager to fire off a datastore reload. be aware that if a user has scrolled to a specific point, they get rolled back to zer0

  3. #3
    Ext User border9's Avatar
    Join Date
    Aug 2007
    Posts
    269
    Vote Rating
    0
    border9 is on a distinguished road

      0  

    Default


    The grid has paging on it, and the paging is set to 20 right now, is there a simple way to get the grid to auto refresh every 20 - 25 seconds all the time to make sure its up to date?

  4. #4

  5. #5
    Ext User border9's Avatar
    Join Date
    Aug 2007
    Posts
    269
    Vote Rating
    0
    border9 is on a distinguished road

      0  

    Default


    ok i was playing with that a little, i got it to not throw any errors but it doesnt appear to be updating

    refresh script
    Code:
    var mainquoterefresh = {
        run: function(){
     loadMask: true,
         mainquoteStore
        },
        interval: 10000 //1 second
    }
    Ext.TaskMgr.start(mainquoterefresh);
    Grid its Refreshing
    Code:
    var mainquoteStore = new Ext.data.Store({
         storeId: 'mainquotes',
         proxy: new Ext.data.HttpProxy({url:'php/JSONMQ.php'}),
         reader: new Ext.data.JsonReader({
         root: 'quotesmain',
         remoteSort: true,
         totalProperty: 'totalCount'
       },
       [
       {name: 'select', type: 'float'},
       {name: 'quote', type: 'string' , mapping: 'quote'},
       {name: 'fname', type: 'string' , mapping: 'fname'},
       {name: 'lname', type: 'string' , mapping: 'lname'},
       {name: 'phonenum', type: 'string' , mapping: 'phonenum'},
       {name: 'email', type: 'string' , mapping: 'email'},
       {name: 'timerecieved', type: 'date', dateFormat: 'Y-m-d h:i:s a' , mapping: 'timerecieved'},
       {name: 'customertype', type: 'string' , mapping: 'customertype'},
       {name: 'websitesubmit', type: 'string' , mapping: 'websitesubmit'},
       {name: 'delquote', type: 'float'}
       ]
      )
    });
    mainquoteStore.setDefaultSort('quote', 'ASC');
    Am i doint this wrong?

  6. #6
    Ext User
    Join Date
    Jul 2007
    Posts
    3,128
    Vote Rating
    1
    devnull is an unknown quantity at this point

      0  

    Default


    theres a few extension that have been written for this as well.

  7. #7
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Vote Rating
    80
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    your function declaration is completely incorrect.
    try:
    PHP Code:
    var mainquoterefresh = {
        
    run: function(){
             
    mainquoteStore.load();
        },
        
    interval10000 //1 second
    }
    Ext.TaskMgr.start(mainquoterefresh); 

  8. #8
    Sencha User chetan.akarte's Avatar
    Join Date
    May 2010
    Location
    Navi Mumbai, India
    Posts
    5
    Vote Rating
    0
    chetan.akarte is on a distinguished road

      0  

    Default


    A TaskRunner [Ext.util.TaskRunner()] can be a good alternative to auto refresh a Grid. Derived from Class Ext.util; Class Ext.util.TaskRunner - Provides the ability to execute one or more arbitrary tasks in a multithreaded manner. Generally, you can use the singleton Ext.TaskMgr instead, but if needed, you can create separate instances of TaskRunner.

    Code:
     var task = {
        run: function() {
            mainquoteStore.load() // mainquoteStore is a variable... var mainquoteStore=new Ext.data.Store();
        },
       interval: 10000 //10 second
        }
        var runner = new Ext.util.TaskRunner();
        runner.start(task);
    ~::Chetan Akarte::~
    http://www.tipsntracks.com

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