Two things:
1. You are trying to bind the ArrayCollection, but you didn't instantiate it with the Array as the source. Note: you can just use an Array as the dataProvider for a ComboBox. The code should be:
[Bindable]
public var file_status:ArrayCollection = new ArrayCollection(file_statuslist);
2. Since the itemRenderer is a child, you have to reference the parentDocument (scope). This change should produce the desired result:
<mx:ComboBox dataProvider="{parentDocument.file_statuslist}"/>
-TH
--- In [email protected], Impudent1 <[EMAIL PROTECTED]> wrote:
>
> I know this has been beaten to death but I have not been able to get
> anything working here :(
>
> In the script section of my code I have:
>
> // create our file Status array, this is hardcoded here but should grab
> from the database
> public var file_statuslist:Array = ["Active", "Inactive", "Pending
> Approval", "Approved"];
> [Bindable]
> public var file_status:ArrayCollection;
>
>
> In the regular app code section I have a datagrid as:
>
> <mx:DataGrid id="fileDatagrid" x="0" y="0" width="715" height="130"
> dataProvider="{files_datagrid}" change="putVideo()" selectedIndex="0">
>
> <mx:columns>
> <mx:DataGridColumn headerText="Clip" dataField="path"/>
> <mx:DataGridColumn id="statuscolumn" headerText="Status"
> width="100" dataField="status">
> <mx:itemRenderer>
> <mx:Component>
> <mx:ComboBox dataProvider="{file_status}" />
> </mx:Component>
> </mx:itemRenderer>
> </mx:DataGridColumn>
> </mx:columns>
>
>
>
> Which ends up with 1120:Access of undefined property file_status. errors
>
> What I am shooting for is the status column to set the dropdown to match
> my datagrid provider status for each item, while keeping its set options
> available.
>
>
> I would prefer to keep this simple and inline but if making some sort of
> custom itemrenderer component is the way to go I will have to take on
> that part of the learning curve :)
>
> tia
>
> Impudent1
> LeapFrog Productions
>
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
| Software development tool | Software development | Software development services |
| Home design software | Software development company |
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
__,_._,___

