First, don't use Array, use ArrayCollection. Declare the variable like
this:
[Bindable]var _acMyArrayCollection:ArrayCollection;
In a function, do:
_acMyArrayCollection = new ArrayCollection(myArray);
myControl.dataProvider = _acMyArrayCollection;
or bind to the instance variable:
<mx:DataGrid dataProvider="{_acMyarrayCollection}" .../>
Tracy
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of hartws1
Sent: Tuesday, February 20, 2007 7:21 PM
To: [email protected]
Subject: [flexcoders] Binding to a dataprovider in ActionScript
I'm aware that the syntax in mxml is:
dataprovider = "{ myArray }"
What is (or is there) an equivalent way to perform the same function
in actionscript?
Thanks in advance for any insight.