0 Replies Latest reply on Jun 16, 2009 3:41 AM by nikos101

    Very complex advanced datagird question sorry :)

    nikos101 Level 2

      Hi

       

      I have a grouping collection which is the dataprovider for a ADG

       

          <mx:GroupingCollection id="gcDateRef" source="{branchData}">

       

              <mx:Grouping>
                  <mx:GroupingField groupingFunction="groupingObjectFunctionOnlyDays" compareFunction="date_sortCompareFunc"/>
                  <mx:GroupingField name="initdealno">
                      <mx:summaries>
                          <mx:SummaryRow summaryPlacement="group">
                              <mx:fields>
                                  <mx:SummaryField label="totalTransfers" dataField="rate" operation="COUNT"/>
                                  <mx:SummaryField label="totalGBP_Eq" summaryFunction="countGPB_4_Ref"/>
                              </mx:fields>
                          </mx:SummaryRow>
                      </mx:summaries>
                  </mx:GroupingField>
              </mx:Grouping>

       


          </mx:GroupingCollection>

       

       

      The ADG displayes the SummaryField fields via a item renderers:

       

                  <mx:rendererProviders>
                          <mx:AdvancedDataGridRendererProvider id="refRP0" columnIndex="1" columnSpan="12" depth="1" renderer="{new                          ClassFactory(ItemTotalGBP_Renderer)}">

       

                          </mx:AdvancedDataGridRendererProvider>

       

                      </mx:rendererProviders>

       

       

       

       

      package
      {
          import mx.controls.advancedDataGridClasses.AdvancedDataGridItemRenderer;
          import mx.formatters.CurrencyFormatter;

       

          public class ItemTotalGBP_Renderer extends AdvancedDataGridItemRenderer
          {
              public function ItemTotalGBP_Renderer()
              {
                  super();
              }

       

              override public function set data(value:Object):void
              {
                  var currencyFormatter:CurrencyFormatter = new CurrencyFormatter();
                  currencyFormatter.precision = 2;
                  currencyFormatter.currencySymbol = '';
                  super.data = value;
                  var containsIncomplete:Boolean = false;
                  for each(var object:Object in value.children){
                      if(!object.matched){
                          containsIncomplete = true;
                          break;
                      }
                  }
                  var printed:String = '';
                  if(value.children[0].printed){
                      printed = '                     Printed'
                  }
                  if(containsIncomplete){
                      listData.label = "Incomplete\t\t\t\t\t" + data["totalTransfers"] + " Transfers   " + currencyFormatter.format(data["totalGBP_Eq"]) + " GBP equivalent" + printed;
                  }
                  else{
                      listData.label = "\t\t\t\t\t\t\t\t" + data["totalTransfers"] + " Transfers   " + currencyFormatter.format(data["totalGBP_Eq"]) + " GBP equivalent" + printed;
                  }
              }

       

          }
      }

       

      The  set data methods outputs a string which is displayed in columnIndex="1" to columnSpan="12"in a grouped node. However I cannot find a way to find this string anywhere in the debug view, (I am trying to modify this string as the user interacts with the ADG.

       

      Any ideas where these strings that are outputed from the "set data" are kept