PDA

View Full Version : copying data from a datagrid to ArrayCollection


bidur
01-05-2009, 11:22 AM
Hi,
I have got a dataGrid "myGrid". A httpService provides data to this datagrid.
After the dataGrid is populated I want to copy the data from this dataGrid to a ArrayCollection "myDPColl".


<mx:Script>
<![CDATA[
private var myDPColl:ArrayCollection;

]]>
</mx:Script>

<mx:DataGrid id="myGrid" >

</mx:DataGrid>



Thanks

rawmantick
01-05-2009, 11:29 AM
Use Flex forum. This one is for pure AS3.

ljuwaidah
01-05-2009, 07:02 PM
i'm not quite sure but you can try parsing the dataprovider as an arraycollection

drkstr
01-05-2009, 07:35 PM
What I would do is listen for a result event on your HTTPService and fill your ArrayCollection directly from the source. In my opinion, it seems unnatural to use a visual component as a middle-man for your data operations.

I don't know any details on your HTTPService implementation, so I can't give you any specifics on how to do this.


Best Regards,
~Aaron