2017-04-27 7 views
1

rallytreeridにexpand allとオプションを追加します。 私はhttps://help.rallydev.com/apps/2.1/doc/#!/example/simple-tree-gridでコードを使用し、値がtrueexpandAllInColumnHeaderEnabledプロパティを追加しました。まだexpand allcollapse allのオプションが機能していません。続き'all expand'と 'all collapse all'オプションはrallytreegridで動作しません

が更新されたコードです:

<!DOCTYPE html> 
<html> 
<head> 
    <title>Simple Tree Grid Example</title> 

    <script type="text/javascript" src="/apps/2.1/sdk.js"></script> 

    <script type="text/javascript"> 
     Rally.onReady(function() { 
      Ext.define('Rally.example.SimpleTreeGrid', { 
       extend: 'Rally.app.App', 
       componentCls: 'app', 

       launch: function() { 
        Ext.create('Rally.data.wsapi.TreeStoreBuilder').build({ 
         models: ['userstory'], 
         autoLoad: true, 
         enableHierarchy: true 
        }).then({ 
         success: this._onStoreBuilt, 
         scope: this 
        }); 
       }, 

       _onStoreBuilt: function(store) { 
        this.add({ 
         xtype: 'rallytreegrid', 
         store: store, 
         context: this.getContext(), 
         enableEditing: false, 
         enableBulkEdit: false, 
         shouldShowRowActionsColumn: false, 
         expandAllInColumnHeaderEnabled: true, 
         enableRanking: false, 
         columnCfgs: [ 
          'Name', 
          'ScheduleState', 
          'Owner' 
         ] 
        }); 
       } 
      }); 


      Rally.launchApp('Rally.example.SimpleTreeGrid', { 
       name: 'Simple Tree Grid Example' 
      }); 
     }); 
    </script> 

    <style type="text/css"> 

    </style> 
</head> 
<body></body> 
</html> 

助けてください。前もって感謝します。

答えて

0

これはちょっと変わったものでした。これを有効にするには、すでに見つかった設定フラグを有効にし、ツリーグリッドにプラグインを追加する必要があります。

plugins: [{ ptype: 'rallytreegridexpandedrowpersistence'}], 
expandAllInColumnHeaderEnabled: true