在 extjs 中,我有一个 GridPanel。
我想隐藏这个网格面板的一些列,我正在使用 Hidden="true"
它,它工作正常。
问题是,当我单击网格菜单时,有一个名为“列”的选项。当您将鼠标悬停在“列”上时,您可以选中/取消选中要显示/隐藏的列。
我想在此列表中显示隐藏列(未选中),以便用户可以检查它们并手动将其显示在网格上。
我尝试设置 Hideable="true"
,但这些列仍然没有显示在“列”列表中。
请提出解决方案
配置选项为hidden:true
(小写),例如:
,columns:[{
text:'Company'
,dataIndex:'company'
,flex:10
},{
text:'Price'
,xtype:'numbercolumn'
,dataIndex:'price'
,align:'right'
,width:80
},{
text:'Last Updated'
,xtype:'datecolumn'
,dataIndex:'lastChange'
,align:'right'
,width:135
,hidden:true
},{
text:'Industry'
,dataIndex:'industry'
,flex:4
}] // eo columns
在这种情况下,列Last Updated
最初是隐藏的,但仍会出现在列菜单中。如果您仍有问题,请在https://fiddle.sencha.com上进行展示