1 Reply Latest reply on May 28, 2008 11:02 PM by Sreenivas R

    Using XML data in grouped collection

    scrattis Level 1
      I searched everywhere and seems like all examples are from arraycollection to grouped collection.
      My XML has this format:
      <Tulokset>
      <Tulos id="xxx" group="xx" />
      <Tulos id="xxx" group="xx" />
      <Tulos id="xxx" group="xx" />
      </Tulokset>

      And i would need to group them by the @group.
        • 1. Re: Using XML data in grouped collection
          Sreenivas R Adobe Employee
          <mx:XML id="inputData" >
          <Tulokset>
          <Tulos id="xxx" group="xx" />
          <Tulos id="xxx" group="xx" />
          <Tulos id="xxx" group="xx" />
          </Tulokset>
          </mx:XML>

          <mx:AdvancedDataGrid creationComplete="gc.refresh()">
          <mx:dataProvider>
          <mx:GroupingCollection source="{inputData.Tulos}" id="gc">
          <mx:Grouping>
          <mx:GroupingField name="@group" />
          </mx:Grouping>
          </mx:GroupingCollection>
          </mx:dataProvider>
          <mx:columns>
          <mx:AdvancedDataGridColumn dataField="@id" />
          </mx:columns>
          </mx:AdvancedDataGrid>