如何隐藏extjs网格列名?

时间:2012-04-05 09:00:36

标签: extjs

我的网格是这样的:

Ext.define('Exp.view.dashboard.Tv', {
    extend: 'Ext.grid.Panel',

    initComponent: function() {
        this.columns = [
            {header: 'Name',  dataIndex: 'name',  flex: 1},
            {
                header: 'Actions',
                xtype: 'actioncolumn',
                items: [
                    {
                        icon   : '/images/icons/star_off.png'
                    }
                ]
            }
        ];

        this.callParent(arguments);
    }
});

我想隐藏名称操作。也许有一些未记录的配置选项可以做到这一点?

1 个答案:

答案 0 :(得分:3)

在extjs 4中,有“hideHeaders”选项。将其设置为true。

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Table-cfg-hideHeaders

网格面板扩展了表格面板,因此它具有此选项。

相关问题