Reputation: 6631
I have a grid and controller for it. I try listen for 'select' event for the grid.
The code is:
Ext.define('Icc.controller.Questionnaires', {
extend: 'Ext.app.Controller',
stores: ['Questionnaires'],
models: ['Questionnaire'],
views: ['QuestionnairesGrid'],
init: function() {
this.control({
'mygrid > selectionmodel': {
// do what I need here
}
});
}
});
How it can be done correctly?
Upvotes: 3
Views: 3978
Reputation: 6631
I found the way to do that:
init: function() {
this.control({
'questionnairesgrid': {
selectionchange: this.selectionChange
}
});
},
Strange that I can listen events for selection model for the grid itself...
Upvotes: 5