I want to use a PopUpMenuButton as an Itemrederer in a datagrid column, I can get the button just find but I can't get it(PopUpMenuButton) to have the list of items I need. I tried seting the PopUpMenuButton's dataprovider but I get an error message about the "access to undefined property. what am I doing wrong?
Here is the code:
<mx:Array id="productCategorys">
<mx:String>Autographs</mx:String>
<mx:String>Movie_Memorabilia</mx:String>
<mx:String>other</mx:String>
</mx:Array>
<mx:DataGrid x="10" y="262" width="758" height="124" rowHeight="20" alternatingItemColors="[#F7F7F7, #A6A6A6]"
id="ReceiptsOrderList" dataProvider="{NewOrderDataBase}" click="onDataGridClick(event)">
<mx:columns>
<mx:DataGridColumn headerText="Product Category" dataField="Type" width="175" id="PC">
<mx:itemEditor>
<mx:Component>
<mx:PopUpMenuButton dataProvider="{productCategorys}"/>
</mx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
<mx:DataGridColumn id="Des" headerText="Description" dataField="Description" width="468"/>
<mx:DataGridColumn id="Qty" headerText="Qty" dataField="Quanity" width="30" textAlign="center"/>
<mx:DataGridColumn id="Price" headerText="Price" dataField="Price" width="65" textAlign="right"/>
<mx:DataGridColumn id="Cert" headerText="Cert." dataField="Certificate"
itemRenderer="mx.controls.CheckBox"
rendererIsEditor="true"
editorDataField="selected"
width="40" textAlign="center">
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
07/22/2010 - 08:48
you have to use outerDocument.productCateforys!
greetz
10/11/2010 - 21:32
thanks
Add Comment
[language] [/language]
Examples:
[javascript] [/javascript]
[actionscript] [/actionscript]
[csharp] [/csharp]
See here for supported languages.
Javascript must be enabled to submit anonymous comments - or you can login.