bzouchir
04-15-2008, 12:58 PM
Hi everyone,
I was wondering if there is a way to pass data to a custom itemEditor in a DataGrid.
for instance let's say I have a SomeComponent.mxml that I am using as itemEditor in MainApp.mxml
<mx:Application ...>
<mx:Script>
<![CDATA[
private var foo:Array;
]]>
</mx:Script>
<mx:DataGrid ... >
<mx:DataGridColumn headerText="File" editable="true" editorDataField="newImage" itemEditor="SomeComponent">
</mx:DataGrid>
</mx:Application>
my question is:
how can i pass the "foo" attribute to the "SomeComponent" itemEditor?
all the examples i have seen are using hardcoded static data.
"SomeComponent" is a ComboBox fed with dynamic data "foo"
I can call the server back from the "SomeComponent" but isn't there an easier more efficient way!?
I will appreciate any help.
thanks
I was wondering if there is a way to pass data to a custom itemEditor in a DataGrid.
for instance let's say I have a SomeComponent.mxml that I am using as itemEditor in MainApp.mxml
<mx:Application ...>
<mx:Script>
<![CDATA[
private var foo:Array;
]]>
</mx:Script>
<mx:DataGrid ... >
<mx:DataGridColumn headerText="File" editable="true" editorDataField="newImage" itemEditor="SomeComponent">
</mx:DataGrid>
</mx:Application>
my question is:
how can i pass the "foo" attribute to the "SomeComponent" itemEditor?
all the examples i have seen are using hardcoded static data.
"SomeComponent" is a ComboBox fed with dynamic data "foo"
I can call the server back from the "SomeComponent" but isn't there an easier more efficient way!?
I will appreciate any help.
thanks