0 Replies Latest reply on Mar 29, 2010 10:19 AM by BuebEspuenja

    AdvancedDataGrid and Ordering

    BuebEspuenja

      Personally, I have an AdvancedDataGrid grouped by: GROUPNAME -> NAMESUBGROUP -> DESCRIPTION.
      However, each group has an identifier that defines in what order it appears, that is, a group that starts with A can be the last item to be displayed, and a group F can be the first.
      How do I fix this?

       

      The fields are returned in the ArrayCollection: (GROUPNAME,
      SUBGROUPNAME, DESCRIPTION, PHONE, POSITIONGROUP, POSITIONSUBGROUP)

      E.g.
      GROUPNAME, SUBGROUPNAME, DESCRIPTION, PHONE, POSITIONGROUP, POSITIONSUBGROUP
      Friends - Friends of work - Marta- 1111111    - 1 - 1
      Friends - Friends of work - Bob   - 1111111    - 1 - 1
      Friends - Old Frieds        - Luisa  - 1111111    - 1 - 2
      Friends - Old Frieds        - Carl- 1111111        - 1 - 2
      Family - Brothers            - Paul - 55656565     - 2 - 1

       

      Source of AdvancedDataGrid:

       

      <mx:AdvancedDataGrid y="338" height="185" designViewDataType="flat"
      left="15" right="15">
                      <mx:dataProvider>
                              <mx:GroupingCollection2 id="adg2" source="{dpFlat}">
                                      <mx:grouping>
                                              <mx:Grouping label="GROUP">
                                                      <mx:GroupingField name="GROUPNAME"/>
                                                      <mx:GroupingField name="SUBGROUPNAME"/>
                                              </mx:Grouping>
                                      </mx:grouping>
                              </mx:GroupingCollection2>
                      </mx:dataProvider>
                      <mx:columns>
                              <mx:AdvancedDataGridColumn dataField="DESCRIPTION"
      headerText="Description"/>
                              <mx:AdvancedDataGridColumn dataField="PHONE" headerText="Phone"
      width="100"/>
                      </mx:columns>
      </mx:AdvancedDataGrid>

       

      --

      Sorry my english (Google Translator) =P