Reputation: 103
In EXT JS grid, for column with xtype: actioncolumn, the column header is not showing up in show/hide column list. It comes up as 'Actions' by default for actioncolumn column. Can we override actual column header in the list of columns to show/hide for actioncolumn columns? Image shows a screenshow of examples from sencha examples.
Upvotes: 3
Views: 1330
Reputation: 1441
If you want change the Label in Columns, You need to use a config called menuText
for actioncolumn
Example: (https://fiddle.sencha.com/#fiddle/1944)
{
xtype:'actioncolumn',
width:50,
menuText: 'My Actions',
items: [{
icon: 'extjs-build/examples/shared/icons/fam/cog_edit.png', // Use a URL in the icon config
tooltip: 'Edit',
handler: function(grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
alert("Edit " + rec.get('firstname'));
}
},{
icon: 'extjs-build/examples/restful/images/delete.png',
tooltip: 'Delete',
handler: function(grid, rowIndex, colIndex) {
var rec = grid.getStore().getAt(rowIndex);
alert("Terminate " + rec.get('firstname'));
}
}]
}
Upvotes: 4