1 Reply Latest reply on Oct 29, 2009 3:40 AM by crofteur

    AdvancedDataGrid with variable depth

    crofteur Level 1



      i have to make an ADG with variable depth...


      for example


      -level 1 (no info)

           -level2 (no

                -level3 x x x x x x

      -level1 item xxxxxxx


      if i take the example from tour de  flex :


      private var dpFlat:ArrayCollection = new ArrayCollection([
                    {Region:"Southwest", Territory:"Arizona",
                        Territory_Rep:"Barbara Jennings", Actual:38865, Estimate:40000},
                    {Region:"Southwest", Territory:"Arizona",
                        Territory_Rep:"Dana Binn", Actual:29885, Estimate:30000}, 
                    {Region:"Southwest", Territory:"Central California",
                        Territory_Rep:"Joe Smith", Actual:29134, Estimate:30000}, 
                    {Region:"Southwest", Actual:52888, Estimate:45000},


      the tthree first has "region" and "territory" groupingNameField

      the last only region


                      <mx:GroupingCollection id="gc" source="{dpFlat}">
                                  <mx:GroupingField name="Region"/>
                                  <mx:GroupingField name="Territory"/>


      impossible to get work this example


      i populate my adg dataprovider  with a list of item

      if i set the grouping to 3 depth (with 3 groupingField) and if my list got items with all 3 groupingNameField, its ok

      bug if an item has only 1 groupingNameField, it crash (a term does not have property error 1010)

      i try many things with the groupingcollection but if my item of ma list does not have the property to group as well as all, does not work


      if u don't understand, ask me ^^


      thx for help