I am trying to change the background color of my datagrid. I have the following which does change the color to red.... but only after I have clicked on the grid. I need the background color to start as red.
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
{
super.updateDisplayList(unscaledWidth, unscaledHeight);
var g:Graphics = graphics;
g.clear();
if (this.column.dataField == "data1")
{
g.beginFill(0xFF0000);
g.drawRect(0, 0, unscaledWidth, unscaledHeight);
g.endFill();
}
}
This is inside my custom ItemRenderer