【问题标题】:How to remove picker from column header of Ext JS Grid如何从 Ext JS Grid 的列标题中删除选择器
【发布时间】:2012-08-24 09:53:13
【问题描述】:

我想从网格的列标题中删除选择器(具有排序和列选择选项)。我正在使用 Ext JS 4.1.1

【问题讨论】:

    标签: extjs grid styles


    【解决方案1】:

    多年来,这种情况已经发生了变化。

    在 4.2.2(当前为 2014 年 5 月)中有一个可以为每一列设置的属性:

    menuDisabled:true
    
    sortable:false // menu shows but no sort options
    
    hideable:false // menu shows but column name not shown in columns menu
    
    menuDisabled:true // no menu
    

    这些是针对单个列的。对于整个网格标题,另请参阅http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.header.Container-cfg-enableColumnHide

    【讨论】:

    • 谢谢,这很有帮助。也适用于 ExtJS 5。我已经过滤并且 menuDisabled:true 也删除了过滤,但是 hideable: true 工作正常。
    【解决方案2】:

    在 Ext3 中,这将通过在列定义中指定 menuDisabled: true 来完成。不过,不确定 Ext4。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多