javascript - Accordion 内部的 ext.js 网格 : how to set the grid header to the accordion's

标签 javascript css extjs accordion gridpanel

我正在尝试在 Accordion 面板中创建一个网格。事情是,网格已经有一个标题,所以我得到 2 个标题,一个在另一个下面。我的目的是在标题中添加排序按钮和过滤搜索框。我真的不知道应该隐藏哪一个,以及如何......

而且..我是 js 和 ext.js 的新手.. 使用 ext.js 4.2.2:

contactListView.js:

Ext.define( 'AcWeb.view.ContactListView',
{
    extend: 'Ext.grid.Panel',
    xtype: 'contact-list-view',
    requires: [
        'Ext.grid.feature.Grouping'
    ],
    collapsible: true,
    iconCls: 'icon-grid',
    frame: false,
    resizable: false,

    initComponent: function()
    {
        this.store = new AcWeb.store.ContactList();
        this.columns = [
        {
            text     : 'Contact List',
            width    : '100%',
            sortable : true,
            flex     : 1,
            dataIndex: 'userName'
        }];

        this.callParent();
    },

});

容器 Accordion - westview.js:

Ext.define('AcWeb.view.WestView', {
    extend: 'Ext.panel.Panel',
    requires: [
        'Ext.layout.container.Accordion',
        'AcWeb.view.ContactListView'

    ],

    xtype: 'west-view',
    layout: 'accordion',
    title: '',
    defaults: {
        bodyPadding: 10
    },



    initComponent: function() {
        Ext.apply(this, {
            items: [
            {
                // preventHeader: true,
                // html: 'david'
                //hidden: true ,
                // title: 'Accordion Item 3',
                xtype: 'contact-list-view'
            }, {
                title: 'Accordion Item 3',
                html: 'moshe'
            }, {
                title: 'Accordion Item 4',
                html: 'david'
            }, {
                title: 'Accordion Item 5',
                html: 'davidmoshe'
            }]
        });

        this.callParent();
    }
});

最佳答案

我建议从网格中删除“title”属性。

title: 'some title' //remove this

通过这样做,它将删除网格的标题

关于javascript - Accordion 内部的 ext.js 网格 : how to set the grid header to the accordion's,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23781883/

相关文章:

javascript - 发布值形成复选框数组

css - 具有不透明度和过渡效果的动画混合模式

css - 如何自定义 GWT 组件样式?

javascript - 如何比较 Angular 元素与 jQuery 元素

javascript - 在函数执行时使用通过 let 定义的变量的函数

javascript - 需要帮助在单击时切换此按钮

css - 网站对齐宽度,出错了

ExtJs 3 - 添加监听器

ajax - ColdFusion 不处理 CFC 的 HTTP OPTIONS 请求

javascript - 如何将 mouseenter 监听器添加到 xtemplate 内的 div