Rally1

Expand all | Collapse all

API - Auto expand a tree grid

  • 1.  API - Auto expand a tree grid

    Posted 06-19-2017 09:46 AM
    Hi there - I hope someone can help.
    I have put together the HTML below to display a hierarchy for a particular project starting at a particular level (portfolio epic in this case) - to be put into Confluence.
    When it is displayed it doesn't auto expand - so looks a bit odd - I only have 1 item at the top level so my page looks a bit bare. Is it possible to display the tree expanded ?


    <!DOCTYPE html> <html> <head>     <title>Project Hierarchy</title>      <script type="text/javascript" src="https://rally1.rallydev.com/apps/2.1/sdk.js?apiKey=[key]"></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: ['PortfolioItem/PortfolioEpic'],                                 context: {                                  project: '/project/96617353056',                                  projectScopeDown: true                              },                               filters: [{property: 'name',                                 operator : '=',                                 value : [name]}                                 ],                         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,                         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>


  • 2.  Re: API - Auto expand a tree grid

    Posted 07-31-2017 12:20 PM

    Hey Graham, 

     

    It sounds like davse04 looked into this and we couldn't figure out any way to do it either. Were you able to figure anything out here since the original post? 

     

    Unless morky01 has any ideas!



  • 3.  Re: API - Auto expand a tree grid

    Posted 08-01-2017 04:27 AM

    Hi John,

     

    Unfortunately I'm no further on - not the end of the world but a bit frustrating as it seems like it should be eminently possible!

     

    Graham