-
6 Apr 2007 5:32 AM #1
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.
-
6 Apr 2007 6:18 AM #2
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)}
-
16 Apr 2007 2:20 AM #3
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
-
19 Jul 2009 1:42 PM #4
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.
-
20 Aug 2009 2:31 AM #5
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
-
20 Aug 2009 5:22 AM #6
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
-
20 Aug 2009 10:53 PM #7
Thanks dlbjr i will try it
Best Regards
-
21 Aug 2009 4:30 AM #8
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


Reply With Quote