PDA

View Full Version : Datagrid ItemRenderer


Duane
04-23-2008, 09:23 PM
Hello ... I have a datagrid working in my mxml file. It looks something like this:

<mx:DataGrid id="dgEmployees" width="100%" visible="true">
<mx:columns>
<mx:DataGridColumn width="20" >
<mx:itemRenderer>
<mx:Component >
<mx:HBox >
<mx:PopUpMenuButton label="" dataProvider="{outerDocument.joe}" width="18" height="18"/>
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
<mx:DataGridColumn headerText="Name" dataField="nameFull" width="150" />
</mx:columns>
</mx:DataGrid>

What I want to do is produce this datagrid at runtime through action script. I have it working for everything except the first column ... that is, the first column should have a PopUpMenuButton in it. So .. can anyone help me with the AS to accomplish this?

Thanks .......