I tried something different and got it to work.  Thanks for all your
help.  For others searching, here's what I did. For those following
the thread, if there's a better way to do this, I welcome your
suggestions.  (got the idea to try it this way from "Programming Flex
3. Kazoun, Lott)

relevant MXML snippets:

// as code that process the HTTPService return)
private function statResultHandler(event:ResultEvent):void
{
    statFeed = event.result as XML;
    var statCollection:ArrayCollection = new ArrayCollection;
    for each (var rollup:XML in statFeed.children()) {
        var period:String = [EMAIL PROTECTED];
        for each (var country:XML in rollup.country) {
            var code:String = [EMAIL PROTECTED];
            var detects:int = [EMAIL PROTECTED];
            statCollection.addItem({
                rollup: period,
                country: code,
                quantity: detects
             });
        }
    }
    statGrouping = new GroupingCollection();
    statGrouping.source = statCollection;
    var grouping:Grouping = new Grouping();
    grouping.fields = [new GroupingField("rollup")];
    statGrouping.grouping = grouping;                         
    statGrouping.refresh();
}
 
The ADG mxml:

<mx:AdvancedDataGrid 
        id="myDataGrid"
        dataProvider="{statGrouping}"
        width="50%" 
        height="75%"
        verticalCenter="0" left="0">
        <mx:groupedColumns>
                <mx:AdvancedDataGridColumn headerText="Period"  
dataField="@period"/>
                <mx:AdvancedDataGridColumn headerText="Country" 
dataField="country"/>
                <mx:AdvancedDataGridColumn headerText="Detects" 
dataField="quantity"/>
        </mx:groupedColumns>
</mx:AdvancedDataGrid>


--- In [email protected], "oneworld95" <[EMAIL PROTECTED]> wrote:
>
> Look up "flex itemRenderer" on Google. I think that will enable you to
> customize the component that displays the rollup column. Within the
> itemRenderer, you'd want to do an override of the set data() function. 
> 
> -Alex
> 


Reply via email to