actioncolumn xtype列标题显示列隐藏/显示列表中的操作

时间:2016-04-21 20:14:24

标签: extjs4.2

在EXT JS网格中,对于具有xtype:actioncolumn的列,列标题未显示在显示/隐藏列列表中。它出现在'行动'默认情况下为actioncolumn列。 我们是否可以覆盖列列表中的实际列标题以显示/隐藏actioncolumn列?该图显示了来自sencha示例的示例的屏幕展示。

enter image description here

1 个答案:

答案 0 :(得分:3)

如果要更改列中的标签,则需要为 actioncolumn

使用名为menuText的配置

示例:({{3}})

        {
            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'));
                }
            }]
        }