【问题标题】:Rows hidden in a grid JS EXT隐藏在网格 JS EXT 中的行
【发布时间】:2013-03-13 19:50:36
【问题描述】:

我需要简单地在我的网格中添加一个函数,当用户第一次访问时隐藏行。之后,通过我的网格中已经出现的最小化/展开图标,用户可以展开组并查看行。我的代码是:

// create the grid
var grid = Ext.create('Ext.grid.Panel', {
    store: store,
    hideHeaders: true,
    features: [groupingFeature],

    columns: [
        {text: "Questions",groupable: false, flex: 1, dataIndex: 'species',  sortable: true}
    ],
    width: 250,
    height:260,
    split: true,
    region: 'west'
});

// define a template to use for the detail view

var bookTplMarkup = [
    '{resposta}<br/>'
];

var bookTp1 = Ext.create('Ext.Template', bookTplMarkup);
Ext.create('Ext.Panel', {
    renderTo: 'binding-example',
    frame: true,
    width: 720,
    height: 570,
    layout: 'border',
    items: [
        grid, {
            id: 'detailPanel',
            autoScroll: true,
            region: 'center',
            bodyPadding: 7,
            bodyStyle: "background: #ffffff;",
            html: 'Select one option'
    }]
});

我在哪里添加了 nedded 函数?

【问题讨论】:

    标签: javascript extjs grid


    【解决方案1】:

    我猜grouping 功能的startCollapsed 属性是您正在寻找的:

    { ftype:'grouping', startCollapsed: true }
    

    【讨论】:

    • 谢谢 CD,但请问我在我的代码中在哪里插入这个函数?
    • 好的,我找到了!非常感谢!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-04-02
    • 2011-01-30
    • 2011-01-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多