1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    170
    Vote Rating
    0
    gkassyou is on a distinguished road

      0  

    Default How to auto refresh grid content every x ms

    How to auto refresh grid content every x ms


    I have a borderlayout that contains a gridPanel with a grid. I would like to update the grid content every x m.s.

    Any ideas, examples would be appreciated.

  2. #2
    Ext Premium Member BernardChhun's Avatar
    Join Date
    Mar 2007
    Location
    Quebec, Canada
    Posts
    831
    Vote Rating
    2
    BernardChhun will become famous soon enough

      0  

    Default


    hmm using an infinite loop in which you reload the DataStore might work:

    Code:
    // the never ending loop that will call itself every second
    function timedCount()
    {
    // call here the function that reloads your grid's DataStore t=setTimeout("timedCount()",1000)
    }

  3. #3
    Ext JS Premium Member
    Join Date
    Mar 2007
    Posts
    403
    Vote Rating
    0
    KimH is on a distinguished road

      0  

    Default


    Just remember not to actually update the grid if the data hasn't changed This is for the server to handle using HTTP Response Status Code

  4. #4
    Ext User
    Join Date
    Jul 2008
    Posts
    60
    Vote Rating
    0
    tinakonda is on a distinguished road

      0  

    Default autorefresh

    autorefresh


    Hi,
    When I am using autorefresh for grid, it refreshes every 3minutes In which case my screen is greyed out with loading mask. Is there any option that grid data is refreshed and updated from server, where End user shouldn't feel that fro mbrowser. .
    On a browser I shouldn't see the page refreshign every 3minutes .it greyed out, whcih is annoying.



    Thank you,
    tina.

  5. #5
    Ext User
    Join Date
    Aug 2009
    Location
    Italy
    Posts
    39
    Vote Rating
    0
    Estefan is on a distinguished road

      0  

    Default


    hi tinaKonda.Can you tell please how did you make your grid load the new data addedto the store.i have a grid that is refreshing every few ms but the problem is that it is not showing the new information added.
    Regards

  6. #6
    Ext User dlbjr's Avatar
    Join Date
    Oct 2007
    Location
    Cache, OK USA
    Posts
    280
    Vote Rating
    3
    dlbjr is on a distinguished road

      1  

    Default Sample

    Sample


    Code:
    var ds = new Ext.data.JsonStore({
       url: Config.dataURL,
       root: 'data',
       fields: [
            { name: 'id', type: 'string' },
            { name: 'desc', type: 'string' }
       ]
    });
     
    var g = new Ext.grid.GridPanel({
       //You do not want a load mask
       //loadMask: { msg: Config.load_mask, store: ds },
       viewConfig: { emptyText: 'No data available' },
       title: 'My Data',
       store: ds,
       height: 400,
       width: 400,
       stripeRows: true,
       autoScroll: true,
       sm: new Ext.grid.RowSelectionModel({ singleSelect: true }),
       cm: new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), {
            header: 'id',
            dataIndex: 'id',
            hideable: false,
            sortable: false,
            hidden: false,
            width: 100
       }, {
            header: 'desc',
            dataIndex: 'desc',
            hideable: false,
            sortable: false,
            hidden: false,
           width: 300
       }])
    });
     
    var task = {
       run: function() {
            ds.load()
       },
       interval: 1000 //1 second
    }
     
    var runner = new Ext.util.TaskRunner();
     
    runner.start(task);
    dlbjr - David L. Bryant Jr.

    Owner of
    dlbjr Technology Consulting
    Web2 System Developer & Consultant
    Focused on C.I. - Six Sigma - Shingo - Lean Technologies
    dlbjr.consulting@gmail.com

    Owner of:
    Attractive Graphics - "custom screen printing"
    attractivegraphicscsp@gmail.com

  7. #7
    Ext User
    Join Date
    Aug 2009
    Location
    Italy
    Posts
    39
    Vote Rating
    0
    Estefan is on a distinguished road

      0  

    Smile


    Thanks dlbjr i will try it
    Best Regards

  8. #8
    Ext User dlbjr's Avatar
    Join Date
    Oct 2007
    Location
    Cache, OK USA
    Posts
    280
    Vote Rating
    3
    dlbjr is on a distinguished road

      0  

    Default Slight improvement

    Slight improvement


    Use a GridView instead of s GridPanel as I suggested if just displaying data. This should run lighter.
    dlbjr - David L. Bryant Jr.

    Owner of
    dlbjr Technology Consulting
    Web2 System Developer & Consultant
    Focused on C.I. - Six Sigma - Shingo - Lean Technologies
    dlbjr.consulting@gmail.com

    Owner of:
    Attractive Graphics - "custom screen printing"
    attractivegraphicscsp@gmail.com

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar