首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grid/TreeGrid的筛选器控件

Grid/TreeGrid的筛选器控件
EN

Stack Overflow用户
提问于 2015-04-11 03:35:16
回答 1查看 230关注 0票数 0

筛选器控件组件是否可用于Grid/TreeGrid (类似于Portfolio Items仪表板中的筛选器)?根据SDK2.0文档,这个组件似乎只适用于GridBoard。

EN

回答 1

Stack Overflow用户

发布于 2015-04-13 21:29:37

gridboard是树网格或板子的包装器,filtercontrol插件应该与TreeGrid一起工作。下面是一个将enableHierarchy设置为true和一个rallygridboardcustomfiltercontrol插件的树形网格的示例:

代码语言:javascript
复制
Ext.define('CustomApp', {
    extend: 'Rally.app.App',
    componentCls: 'app',

    launch: function() {
        Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({
            models: ['userstory'],
            autoLoad: true,
            enableHierarchy: true
        }).then({
            success: this._onStoreBuilt,
            scope: this
        });
    },

    _onStoreBuilt: function(store) {
        var modelNames = ['userstory'];
        var context = this.getContext();
        this.add({
            xtype: 'rallygridboard',
            modelNames: modelNames,
            context:context,
            enableHierarchy: 'true',
            toggleState: 'grid',
            plugins: [
                {
                    ptype: 'rallygridboardcustomfiltercontrol',
                    filterControlConfig: {
                        modelNames: modelNames
                    }
                }
            ],
            cardBoardConfig: {
                attribute: 'ScheduleState'
            },
            gridConfig: {
                store: store,
                columnCfgs: [
                    'Name',
                    'ScheduleState',
                    'Owner',
                    'PlanEstimate'
                ]
            },
            height: this.getHeight()
        });
    }
});
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29569410

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档