Can you use the examples on my blog instead? http://blogs.adobe.com/aharui/2007/03/thinking_about_item_renderers_1.ht ml
________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of jovialrandor Sent: Wednesday, January 09, 2008 10:17 AM To: [email protected] Subject: [flexcoders] How do I use the itemrenderer for Datagrid column I have the following code that turns Datagrid cell to red if the value is not 'Y' for 'L0' attribute of the arraycollection object. However, when I run the program, it does not take effect. --------------------------- package { import mx.controls.Label; import mx.controls.listClasses.*; public class BItemRenderer extends Label { private const POSITIVE_COLOR:uint = 0x000000; // Black private const NEGATIVE_COLOR:uint = 0xFF0000; // Red override protected function updateDisplayList (unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); /* Set the font color based on the item price. */ setStyle("color", (data.L0 != 'Y') ? NEGATIVE_COLOR : POSITIVE_COLOR); } } }

