Reputation: 2505
I'm displaying a link to a defect in a Rally Grid in the simple way:
columnCfgs: ['FormattedID', 'Name', ...]
This creates a link to the defect, just like it should. But the column width is way too big. But if I do the following, I loose the link:
columnCfgs: [{dataIndex: 'FormattedID', width: 50, text:'ID'}', 'Name', ...]
Is there a convenient xtype I can use to adjust the width, but still have a link to my defect?
Upvotes: 2
Views: 389
Reputation: 398
For a slightly differnt solution see: this question for how to add the link back to your original try.
Upvotes: 0
Reputation: 8410
Unfortunately there is not an easy way to do this right now. We are going to fix this before we GA the SDK 2.0. For now here is a workaround:
Ext.define('DefectGridApp', {
extend: 'Rally.app.App',
launch: function() {
Rally.data.ModelFactory.getModel({
type: 'Defect',
success: function(model) {
//Get the default field config
var field = model.getField('FormattedID');
var fieldConfig = Rally.ui.grid.FieldColumnFactory.getColumnConfigFromField(field);
//Override with your values
fieldConfig.width = 10;
this.grid = this.add({
xtype: 'rallygrid',
model: model,
columnCfgs: [
fieldConfig, //pass your overridden formatted id field here
'Name',
'Owner'
]
});
},
scope: this
});
}
});
Upvotes: 1