I've been able to implement a custom Text Color Item Renderer for a
datagrid based off of this post Custom item renderer
tml>  .  I've added 2 classes, a ComputedStylesColumn and
ComputedStylesRenderer and I can successfully implement this in the mxml
file, but I was hoping to build my datagrids dynamically with

the mxml that works:
<mx:DataGrid id="dg1" initialize="dg1.dataProvider = dp" paddingTop="0"
paddingBottom="0" verticalAlign="middle" >
<mx:DataGridColumn headerText="Name" dataField="name" width="140"/>
<mx:DataGridColumn headerText="Symbol" dataField="symbol" width="60" />
<local:ComputedStylesColumn headerText="Price" dataField="price"
itemRenderer="ComputedStylesRenderer" />

I've been able to reconstruct most things in actionscript except for the

when I try this:
var custColumn1:ComputedStylesColumn = new ComputedStylesColumn();
custColumn1.dataField = "price";
custColumn1.headerText = "Price";
custColumn1.width = 75;
custColumn1.stylesFunction = computeStyles;

Everything works except:

custColumn1.itemRenderer = ComputedStylesRenderer();
"Implicit coercion of a value of type ComputedStylesRenderer to an
unrelated type mx.core:IFactory"

Reply via email to