我有这样的网格:
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);
}
});
我想隐藏名称和操作。也许有一些未记录的配置选项可以做到这一点?
最佳答案
在 extjs 4 中,有“hideHeaders”选项。将其设置为 true。
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Table-cfg-hideHeaders
网格面板扩展了表格面板,因此它有这个选项。
关于extjs - 如何隐藏 extjs 网格列名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10025628/