2
我有一個'EmployeeList'視圖。裏面有一個網格。我需要處理來自控制器的動作列的單擊事件。下面是這個視圖:ExtJS grid:控制器中處理動作列的單擊事件
Ext.define('ExtApp.view.Employees', {
extend: 'Ext.panel.Panel',
alias: 'widget.employees',
.
.
.
.
.
});
此視圖包含一個網格:
xtype: 'grid',
columns:[{
.
.
.
.
xtype: 'actioncolumn',
text: 'Delete',
width: 100,
items: [{
icon: 'images/deleteEmployee.jpg',
tooltip: 'Delete'
}]
}]
如何處理actioncolumn的Click事件在我的控制?
這裏是控制器的代碼:
Ext.define('ExtApp.controller.Employees', {
extend: 'Ext.app.Controller',
refs: [{
ref: 'employees',
selector: 'employees'
}],
init: function() {
//reference for the grid's actioncolumn needed here
}
});