0 Replies Latest reply on Sep 9, 2009 1:38 PM by NewbieToFlex

    AdvancedDataGrid with dynamic Hierarchical Data


      Hi I am trying to create a Component using the Advanced DataGrid to display Dynamic Columns.  Therefore, we don't know the fields that are coming in and we don't know the field by which we will be grouping.  We can assume that there will be ONE field in Common, i.e 'Category'


      Sample Data:


      var data : ArrayCollection = new ArrayCollection([

      {Category:"Product", Name:"Product 1", Group:"Group 1", Salesperson:"Ted"},

      {Category:"Product", Name:"Product 2", Group:"Group 2", Salesperson:"John"},

      {Category:"Analysts", Outlook:"Outlook 1", Sector:"Sector 1", AnalystName:"Henry"},

      {Category:"Analysts", Outlook:"Outlook 2", Sector"Sector 2", AnalystName:"Goofy"}



      The above data will be fed in and the field name by which we will be grouping will also be send to us. So in this case it's 'Category'. We can assume that all records will have this field.


      I want this to look like below:


      Product                              [Combo Box to select which field to sort by]

           [Icon for Hover]         Product 1     Ted

           [Icon for Hover]         Product 2     John

      Analysts                             [Combo Box to select which field to sort by]

           [Icon for Hover]         Outlook 1     Sector 1

           [Icon for Hover]         Outlook 2     Sector 2


      - When the user hover over the icon, it will display all the data for that row

      - The Columns displayed needs to be dynamic and controlable, not all columns should be displayed

      - Column to sort should be controlled by the Top ComboBox beside the Category Row.  This is a ComboBox that holds all the columns that are displayed.



      - Is this possible using One AdvancedDataGrid or should I use one AdvancedDataGrid for each Category?

      - Is it possible to Add the Columns Dynamically through ActionScript?

      - Can I hide the header? and create my own Renderer where I could specify the Category and also add the ComboBox that will contain all the columns that are being displayed?

      - How would you go about doing this?


      I am just starting off with AdvancedDataGrid, so any help is appreciated. Thank you very much in advance.


      - NewBieToFlex