Hi Mark,
Can you sort on groups at all? Because I know this is a bug in flex that you 
actually cannot sort on grouped data! the groups can only be sorted if the 
original data is a hierarchicalData and not a flatData! 
I'm having the same problem! my data is flat! and in my UI, user can add 
grouping to ADG, I want to make a custom sort function to be able to sort my 
groups! 
let me know if I underestood your question correctly and we are looking for the 
same thing! I posted this question on more than 10 websites! hopefully I'll get 
an answer soon and will share it with you! 

Cheers,
Golnoosh
--- In [email protected], "Mark" <markp.shopping...@...> wrote:
>
> I have an AdvancedDataGrid where I'm trything to display the data in 
> groups.  The column order is as follows -- Person Name, Project, 
> Date, and a few numbered data columns.  I'm tring to sort my data in 
> the order of my columns, Name, Project, Date.  Here's my 
> GroupingCollection:
> 
> <mx:GroupingCollection id="gcPerson">
>  <mx:grouping>
>   <mx:Grouping>
>    <mx:GroupingField id="gfName" name="name"/>
>             
>    <mx:GroupingField id="gfProject" name="title">
>     <mx:SummaryRow summaryPlacement="group">
>      <mx:fields>
>       <mx:SummaryField operation="COUNT" dataField="title"/>
>      </mx:fields>
>     </mx:SummaryRow>
>               
>     <mx:SummaryRow summaryPlacement="last">
>      <mx:fields>
>       <mx:SummaryField operation="SUM" dataField="projectedHours" 
> label="summaryPro" />
>       <mx:SummaryField operation="SUM" dataField="actualHours" 
> label="summary" />
>      </mx:fields>
>     </mx:SummaryRow>
>    </mx:GroupingField>
> 
>   </mx:Grouping>
>  </mx:grouping>
> </mx:GroupingCollection>
> 
> In my ADG it looks good but the date is not sorted.  I used a sort 
> on my ArrayCollection but that didn't do anything to help and when I 
> add another GroupingField for month it just splits it up more than I 
> want.
> 
> Sorting Function:
> 
> private function handleFilterSearch():void{
>     sortA = new Sort();
>     
>     sortByName = new SortField("name", true, false, false);
>     sortByProject = new SortField("title", true, false, false);
>     sortByDate = new SortField("month", true, false, false);
>     
>     sortA.fields=[sortByDate];
>     myData2.sort=sortA;
>     //refresh
>     myData2.refresh();
>     gcPerson.refresh();
> }
> 
> The GroupingCollection sorts the Project and Name, but what can I do 
> sort the date?
> 
> Thanks,
> Mark
>


Reply via email to