I have an AdvancedDataGrid that is being populated by customer data. Each customer has 3 monthly products(1, 3, 6), and also a passed
field specifying whether the customer qualifies for any of the monthly products.
Now the grid is sorting the customer data alphabetically, which is a good thing, but it isnt sorting the monthly products, not so good thing.
The dataProvider looks something like this. (I am grouping by Funder.)
{Funder:"Customer1", Product:"1 Month", Passed:"False"},
{Funder:"Customer1", Product:"3 Month", Passed:"True"},
{Funder:"Customer1", Product:"6 Month", Passed:"True"},
{Funder:"Customer2", Product:"1 Month", Passed:"False"},
{Funder:"Customer2", Product:"3 Month", Passed:"False"},
{Funder:"Customer2", Product:"6 Month", Passed:"False"}
Then results that I get in the grid looks something like this
----------------------------------------
| Funder & Products | Product Passed |
----------------------------------------
| Customer1 | |
| 6 Month | True |
| 3 Month | True |
| 1 Month | False |
| Customer2 | |
| 3 Month | False |
| 6 Month | False |
| 1 Month | False |
----------------------------------------
Any help on getting the products sorted as well?
EDIT:
Here is the code I use for the grid
<mx:AdvancedDataGrid id="myADG"
width="100%" height="100%"
initialize="gc.refresh();"
folderClosedIcon="{null}"
folderOpenIcon="{null}"
defaultLeafIcon="{null}">
<mx:dataProvider>
<mx:GroupingCollection id="gc" source="{mCustomerData}">
<mx:grouping>
<mx:Grouping>
<mx:GroupingField name="Funder"/>
</mx:Grouping>
</mx:grouping>
</mx:GroupingCollection>
</mx:dataProvider>
<mx:columns>
<mx:AdvancedDataGridColumn dataField="Product"
headerText="Funder & Products"/>
<mx:AdvancedDataGridColumn dataField="Passed"
headerText="Product Passed"/>
<mx:AdvancedDataGridColumn dataField="Passed"
headerText="Product Failed"/>
</mx:columns>
</mx:AdvancedDataGrid>