I have DataGrid with Dynamic Columns. The columns will contain ItemRendrer. I'm not familiar with dynamically adding ItemRenderer.
My code is:
var column:DataGridColumn = new DataGridColumn();
column.headerText = item;
column.width=150;
column.dataField=item;
column.itemRenderer = WorkNatureRenderer ;
cols.push(column);
WorkNatureRenderer
is a mxml component.(Hbox
containing TextInput
and Button
)
<?xml version="1.0" encoding="utf-8"?>
<mx:HBox xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300">
<s:TextInput/>
<s:Button/>
</mx:HBox>
But when I add this I got an Error 1067: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory.
Any examples Or Links..
Try this
i guess this will help u...IM NOT SURE..