0 Replies Latest reply on Jan 23, 2011 12:59 PM by Frank F._

    AdvancedDatagrid grouping data in runtime

    Frank F._ Level 1

      Hi all,


      i promise, this is the last post today concerning the adg.


      I have to chage the grouping condition in runtime. My adg looks like...



              <mx:GroupingCollection2 id="gc" source="{model.dp}">
                      <mx:GroupingField id="gf" name="contractNumber" descending="true">
                              <mx:SummaryRow summaryPlacement="group">
                                      <mx:SummaryField2 dataField="salesRevenue" summaryOperation="SUM" />



      Now i need the possibility to switch the grouping condition. My first try is:


                  protected function advanceddatagrid1_clickHandler(event:MouseEvent):void
                      trace ("click");


      And it works nearly fine. The shown code is an handler for a click. Unfortunately the second click will switch the condition. After the first click nothin happens. Why?


      Thank you very much