这可能包括在根据custom store网格_ref。我修改自定义数据网格example来填充每个记录的_ref值的参考柱:
![enter image description here](https://i.stack.imgur.com/CotHD.png)
Ext.define('CustomApp', {
extend: 'Rally.app.App',
componentCls: 'app',
items:{ html:'<a href="https://help.rallydev.com/apps/2.0rc3/doc/">App SDK 2.0rc3 Docs</a>'},
launch: function() {
Ext.create('Rally.data.wsapi.Store', {
model: 'userstory',
autoLoad: true,
listeners:{
load: this._onDataLoaded,
scope: this
},
fetch: ['FormattedID', 'Name', '_ref']
})
},
_onDataLoaded: function(store,data){
var records = _.map(data, function(record){
return Ext.apply({
Ref: record.get('_ref')
}, record.getData());
});
this.add({
xtype: 'rallygrid',
showPagingToolbar: false,
showRowActionsColumn: false,
editable: false,
store: Ext.create('Rally.data.custom.Store', {
data: records
}),
columnCfgs:[
{
xtype: 'templatecolumn',
text: 'ID',
dataIndex: 'FormattedID',
width: 100,
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
},
{
text: 'Name',
dataIndex: 'Name'
},
{
text: 'Reference',
dataIndex: 'Ref',
flex: 1
}
]
})
}
});
这种方法确实让我显示自定义字段列,谢谢 – spsteffl