Losing 'FormattedID' link after applying style changes
-
12-12-2019 - |
Question
I have a rallygrid object set up with the following settings for columnCfgs:
columnCfgs: [
'FormattedID',
'Name',
'PlanEstimate'
]
Which gives me a nice formatted link to the UserStory in the "FormattedID" field. The problem is, I don't like the way the columns are laid out on the page so I changed the FormattedID column to:
{ text: 'ID', dataIndex: 'FormattedID', width: 60 }
This gives me the correct column spacing but the field text is no longer linked directly to the user story it references. How can I alter the column width, but also keep the nice formatting?
Solution
You can use the FormattedIDTemplate class to properly format the link:
{
text: 'ID',
width: 60,
xtype: 'templatecolumn',
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
}
Note that the FormattedIDTemplate class is marked as private, and it's interface may change in future versions of the sdk.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow