I have a view \'EmployeeList\'. Inside it there is a grid. I need to handle the actioncolumn\'s click event from controller. Here is the view:
Ext.define(\'E
If you wanna handle the clicks with your controller, you will have to add a handler to your actioncolumn like this:
xtype:'actioncolumn',
width:50,
items: [{
icon: 'extjs/examples/shared/icons/fam/cog_edit.png', // Use a URL in the icon config
tooltip: 'Edit',
handler: function(view, rowIndex, colIndex, item, e, record, row) {
this.fireEvent('itemClick', view, rowIndex, colIndex, item, e, record, row, 'edit');
}
}]
And then add event handler in your controller for the itemClick event
init: function() {
this.control({
'actioncolumn': {
itemClick: this.onActionColumnItemClick
}
});
},
onActionColumnItemClick : function(view, rowIndex, colIndex, item, e, record, row, action) {
alert(action + " user " + record.get('firstname'));
}
And you should see it working, fiddle here: https://fiddle.sencha.com/#fiddle/grb