2014-01-08 4 views
1

Appsdk2 rc2, кажется, игнорирует параметр ширины в столбцахCfgs для rallygrids.Проблема с шириной столбца rallygrid в rc2

Например:

xtype: 'rallygrid', 
columnCfgs: [ 
    {dataIndex: 'ValueScore', width: 40, text:'Value'} 
] 

Это делает с шириной 40 пикселя в rc1, но не в RC2. Является ли это ошибкой или изменен параметр? Есть ли решение для этого?

ответ

1

Это ошибка в версии 2.0rc2. На данный момент это можно обойти, включив прогибается: нуль в вашей колонке конфигурации, чтобы переопределить то, что сетка делает неправильно:

xtype: 'rallygrid', 
columnCfgs: [ 
    {dataIndex: 'ValueScore', width: 40, text:'Value', flex: null} 
] 

дефект был представлен, и это должно быть исправлено в следующей версии.

1

Похоже, что ошибка не влияет на сетки на основе пользовательского магазина. Вот это приложение код2 (вы можете увидеть полный код here) с Rally.data.custom.Store, где ширина указывается в clumnCfgs имеет ожидаемый эффект:

_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 колонка выглядит следующим образом:

enter image description here

и с шириной установлен в 40, как это:

enter image description here

Смежные вопросы