Whoops. I meant iconFunction, not itemFunction. At any rate, here's a quick example. If you use a mx:List, it works flawlessly; if you use mx:DataGrid, the myIconFunction is never even called.
<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ [Embed(source="icon_okay.gif")] public var iconSymbol1:Class; private function myIconFunction(item:Object):Class{ var state:String = item.label; if (state == "AL") { return iconSymbol1; } return null; } ]]> </mx:Script> <mx:List iconFunction="myIconFunction"> <mx:dataProvider> <mx:Array> <mx:Object label="AL" data="Montgomery"/> <mx:Object label="AK" data="Juneau"/> <mx:Object label="AR" data="Little Rock"/> </mx:Array> </mx:dataProvider> </mx:List> </mx:Application> ------------------------ Yahoo! Groups Sponsor --------------------~--> Something is new at Yahoo! Groups. Check out the enhanced email design. http://us.click.yahoo.com/TktRrD/gOaOAA/yQLSAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/