Appsdk2 rc2似乎忽略了rallygrids在columnCfgs上的宽度参数。
例如:
xtype: 'rallygrid',
columnCfgs: [
{dataIndex: 'ValueScore', width: 40, text:'Value'}
]这在rc1中以40像素的宽度呈现,但在rc2中不呈现。这是一个bug,还是参数发生了更改?有什么解决办法吗?
发布于 2014-01-08 20:25:41
这是2.0rc2版本中的一个bug。现在,可以通过在列配置中包含flex: null来覆盖网格正在做的错误操作:
xtype: 'rallygrid',
columnCfgs: [
{dataIndex: 'ValueScore', width: 40, text:'Value', flex: null}
]已经提交了一个缺陷,应该在下一个版本中修复它。
发布于 2014-01-08 20:25:57
看起来该bug不影响基于自定义存储的网格。下面是一个rc2应用程序(您可以看到完整的代码这里),其中Rally.data.custom.Store中指定的宽度具有预期的效果:
_createTestSetGrid: function(testsets) {
var testSetStore = Ext.create('Rally.data.custom.Store', {
data: testsets,
pageSize: 100,
});
if (!this.down('#testsetgrid')) {
this.grid = this.add({
xtype: 'rallygrid',
itemId: 'testsetgrid',
store: testSetStore,
columnCfgs: [
{
text: 'Formatted ID', dataIndex: 'FormattedID', xtype: 'templatecolumn',
tpl: Ext.create('Rally.ui.renderer.template.FormattedIDTemplate')
},
{
text: 'Test Case Count', dataIndex: 'TestCaseCount',
},
{
text: 'Test Case Status', dataIndex: 'TestCaseStatus', width: 200, //width: 40
},
{
text: 'TestCases', dataIndex: 'TestCases',
renderer: function(value) {
var html = [];
Ext.Array.each(value, function(testcase){
html.push('<a href="' + Rally.nav.Manager.getDetailUrl(testcase) + '">' + testcase.FormattedID + '</a>')
});
return html.join(', ');
}
}
]
});
}else{
this.grid.reconfigure(testSetStore);
}
}如果宽度设置为200 TestCasesStatus列,如下所示:

宽度设为40,像这样:

https://stackoverflow.com/questions/21004026
复制相似问题