I need to convert a datagrid table in Adobe Flex to an ArrayCollection. I was expecting to be able to loop through each row of a datagrid and write that to the Array collection, but the only method for accessing data in the datagrid that I can find is SelectedItem, which doesn't help me.
Obviously one could just copy the dataProvider for the datagrid, but my datagrid is editable and I need to store the state of the datagrid at any one time into a database. Can anyone recommend a method of doing this?
Much Appreciated
-Matt
Best Answer
If your DataGrid is:
Then check if this.provider is Array or ArrayCollection. If it is ArrayCollection then access it simply by:
if it is an Array, then:
Hope this helps.