过滤器控制组件是否可用于Grid / TreeGrid(类似于“项目组合项”仪表板中的过滤器)?根据SDK 2.0文档,该组件似乎仅适用于GridBoard。
答案 0 :(得分:0)
gridboard
是treegrid或board的包装器,filtercontrol插件应该与TreeGrid一起使用。以下是enableHierarchy
设置为true且rallygridboardcustomfiltercontrol
插件的树网格示例:
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()
});
}
});