Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS 4 Grid Update

Sorry if this is a stupid question, but I'm trying to learn ExtJS ;)

Im create model.

Ext.regModel('item',{

Create data store.

var store = Ext.create('Ext.data.Store', {
        model: 'pitem',

Create Grid

var grid = new Ext.grid.GridPanel({
        store: store,

Work good and load data on document load succcessful. But now I need to update grid every 30 minutes or by clicking the refresh button. How can I execute the update action?

like image 616
Kein Avatar asked Feb 20 '26 23:02

Kein


1 Answers

The part with upgrading store every 30 minutes :

var task = 
{
   run : function() 
   {
      store.load();
   },
   interval: 1800000 //(1 second = 1000)
}

Ext.TaskManager.start(task);
like image 127
scebotari66 Avatar answered Feb 22 '26 11:02

scebotari66



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!