Also it may be that your setter is not getting called again? Look into calling notifyItemUpdate on the dataProvider (or source collection) passing in the dataObject where you changed the value of plotted.
Matt -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Manish Jethani Sent: Thursday, March 09, 2006 2:10 PM To: [email protected] Subject: Re: [flexcoders] Changing Renderer Dynamically in DataGrid (Flex2) On 3/8/06, dh_brown <[EMAIL PROTECTED]> wrote: > <?xml version="1.0" encoding="utf-8"?> > <!-- RendererText.mxml --> > > <mx:Text xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*"> > <mx:Script > > <![CDATA[ > // Override the setter method. > [Bindable] > public var myColor:String = new String; > override public function set dataObject(value:Object):void { > if(value != null) { > // Use super to set the value in the base class. > super.dataObject = value; > // Determine the text color based on whether it > has been added to the graph. > if (value.plotted == "TRUE") { > myColor = "#FF0000"; > } > else { > myColor = "#0000FF"; > } > } > } > ]]> > </mx:Script> > <mx:color>{myColor}</mx:color> > </mx:Text> You almost never have to override dataObject in a cell renderer. Your example can be reduced to the following: <mx:Text xmlns:mx="http://www.macromedia.com/2005/mxml" xmlns="*" color="{dataObject.plotted == 'TRUE' ? '#FF0000' : '#0000FF'}"> </mx:Text> See if that works. Manish -- 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 -- 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/

