This content has been marked as final. Show 4 replies
Data providers need to be an ArrayCollection or XMLListCollection.
In your example, it's not clear what you're trying to achieve.
Are you trying to cast every record in lastResult.results.record to a String and bind that to the DataGrid?
Well i have 2 httpservices, and one datagrid, i was hoping i could change the dataprovider depending on which one is called.
so i thought maybe i could call a string and change that when needed
Well, you can change the dataProvider easily enough, but it's still unclear what you're intentions are.
You're binding a single string, not an array of data.
Are you trying to bind the record? i.e.:
public var connectionType:ArrayCollection = connection.lastResult.results.record;
i dont think that worked, got error saying cannot convert to array etc, i had imported array util aswell,
anyway i figured it out, i just added result="dataHandler()" to my HTTPSERVICE
public function dataHandler():void
myDataGrid.dataProvider = connection.lastResult.results.record;
i have 2 http servies, id connection1 and connection2,
connection.lastResult.results.record; = displays result in datagrid
i wanted to use the SAME datagrid to display connecion2's result BUT not at the same time, etc etc
thanks alot for ur time