There is such a data output from the database

initComponent: function() { Ext.apply(this, { items: [{ xtype: 'grid', hideCollapseTool: true, columnLines: true, viewConfig: { stripeRows: true }, tbar: [{ scope: this, handler: this.onAddClick, tooltip: 'Обновить', tooltipType: 'title', iconCls:'refresh-icon' }, { scope: this, iconCls:'download-icon', disabled: true, tooltip: 'Загрузить', tooltipType: 'title', handler: this.onAddClick }], store: 'TelCatalogStore', columns: [{ text : 'Имя', flex : 1, sortable : true, dataIndex: 'name' }, { text : 'Тип', sortable : false, dataIndex: 'type' }, { text : 'Дата', sortable : false, dataIndex: 'data' }, { text : 'Статус', width : 75, sortable : false, renderer : this.changeRenderer, dataIndex: 'status' }] }] }); this.callParent(); } 

I added this button here

 tbar: [{ scope: this, handler: this.onAddClick, tooltip: 'Обновить', tooltipType: 'title', iconCls:'refresh-icon' } 

How to write a function so that when you click on the button the table is updated?

  • What is the minus ah? - Aslan Kussein
  • one
    I believe that the minus for "write for me." SO is not made for this. For such requests, you need to go to the thematic forums, in this case, the sencha forum. - SlyDeath
  • Thanks I will know - Aslan Kussein

2 answers 2

 this.getViewName.getStore.load(); 

updates the store

     onAddClick: function(me) { this.down('grid').getStore().load(); }