I have a grid panel like this
Ext.define('sCon.view.SalesGrid',{
extend: 'Ext.grid.GridPanel',
title: 'Sales Data',
initComponent: function(){
this.callParent(arguments);
}
});
In the click event, I want to change the title of this panel. My code inside the controller is as follows.
Ext.define('sCon.controller.SalesGridController', {
extend: 'Ext.app.Controller',
views: ['SalesGrid'],
changeTitle: function(newTitle){
this.getView('SalesGrid').setTitle('title_changed');
}
It is currently said that it does not have the setTitle () function. But the docs say the grid has a setTitle () function. I also tried changing the title using the variable 'title', for example
changeTitle: function(newTitle){
this.getView('SalesGrid').title = 'title_changed';
Does not work. Please, help.
amrk7 source
share