views:

102

answers:

0

I have this AdvancedDataGrid you can view at http://rtistique.com/foo/

to view the source, right-click -> view source

It displays a simple ArrayCollection

private var dpFlat:ArrayCollection = new ArrayCollection([
              {Region:"Southwest", Territory:"A"},
              {Region:"Southwest", Territory:"B"},
              {Region:"Southwest", Territory:"C"},
              {Region:"Southwest", Territory:"D"},
              {Region:"NorthEast", Territory:"A"},
              {Region:"NorthEast", Territory:"B"},
              {Region:"NorthEast", Territory:"C"},
              {Region:"NorthEast", Territory:"D"}
            ]);

Notice that Region groups "Southwest" and "NorthEast" is automatically being sorted and are being displayed in alphabetical order: NorthEast SouthEast

also note that the Territory fields are being shuffled, and are not displayed in the right order I have passed them in.

how can I disable that default sorting behavior? and simply display the data as is!

What I am expecting is:

-> Southwest
----> A
----> B
----> C
----> D

-> NorthEast
----> A
----> B
----> C
----> D