Есть такой вывод данных с базы
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();
}
Я добавил сюда такую кнопку
tbar: [{
scope: this,
handler: this.onAddClick,
tooltip: 'Обновить',
tooltipType: 'title',
iconCls:'refresh-icon'
}
Как написать функцию что бы когда нажимаешь на кнопку таблица обновлялась?