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);
}
}
}