The solution is to extend the AdvancedGroupItemRenderer class. I've pasted mine 
below in the case that it helps someone. 

package com.renderer
{
        import mx.charts.styles.HaloDefaults;
        import 
mx.controls.advancedDataGridClasses.AdvancedDataGridGroupItemRenderer;
        import mx.styles.CSSStyleDeclaration;

    [Style(name="rowColor", type="uint", format="Color", inherit="yes")] 

        public class ApplicationGroupItemRenderer extends 
AdvancedDataGridGroupItemRenderer
        {

                private var borderColor:uint  = 0xbcdbcd9;
        private var borderSize:uint   = 0;

                override protected function 
updateDisplayList(unscaledWidth:Number,unscaledHeight:Number):void{
                        super.updateDisplayList(unscaledWidth, unscaledHeight);

            graphics.clear();

            graphics.lineStyle(borderSize, borderColor);
            graphics.beginFill(0xeaeaf4, 1);
            graphics.drawRect(0,0,unscaledWidth, unscaledHeight);
        }
        }
} 

--- In flexcoders@yahoogroups.com, "fumeng5" <fume...@...> wrote:
>
> Hi, 
> 
> I set a styleFunction for my AdvancedDataGrid:
> 
> private function styleRows(data:Object, column:AdvancedDataGridColumn):Object{
>                 return {
>                                       verticalAlign:'middle',
>                                       backgroundColor:"0xeaeaf4",
>                                       borderColor:"0xbcdbcd9",
>                                                       borderStyle:"solid",
>                                                       borderThickness:"1"
>                 }
>                       }
> 
> It styles all my columns correctly except the first one (which is my 
> GroupingField) doesn't get its backgroundColor or borders set. Why might this 
> happen? Here's my AdvancedDataGrid dataProvider and columns set below:
> 
> <mx:dataProvider>
>             <mx:GroupingCollection id="gc" source="{appColl}">
>                 <mx:grouping>
>                     <mx:Grouping>
>                         <mx:GroupingField name="label"/>
>                     </mx:Grouping>
>                 </mx:grouping>
>             </mx:GroupingCollection>
>         </mx:dataProvider> 
>         
>         <mx:columns>
>             <mx:AdvancedDataGridColumn 
>               dataField="label"
>               width="175"/>
>             <mx:AdvancedDataGridColumn 
>               width="300"
>               itemRenderer="com.renderer.ApplicationIndicatorRenderer"/>
>             <mx:AdvancedDataGridColumn 
>               width="300"
>               itemRenderer="com.renderer.ApplicationIndicatorRenderer"/>
>             <mx:AdvancedDataGridColumn 
>               width="300"
>               itemRenderer="com.renderer.ApplicationIndicatorRenderer"/>
>         </mx:columns>
>


Reply via email to