wood burning stoves 2.0*
The moose likes Flex and the fly likes Difference between Array and ArrayCollection ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Difference between Array and ArrayCollection ?" Watch "Difference between Array and ArrayCollection ?" New topic
Author

Difference between Array and ArrayCollection ?

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Hi,

What is the Difference between Array and ArrayCollection ?

and can we use Array as DataProvider in DataGrid ?

what are the benifits of using as Array and ArrayCollection in DataGrid as DataProvider.
sergio ramirez
Greenhorn

Joined: Aug 28, 2011
Posts: 4

Hello Prabhat,

I personally use ArrayCollection when need to bind data to a datagrid view since if you update the ArrayCollection then datagrid view will update too, for other cases I use simple Array.

This is a good post regarding this topic:
http://www.unitedmindset.com/jonbcampos/2009/04/03/do-i-use-array-or-arraycollection/
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 391
Thanks sergio
Andrew flexdeveloper
Greenhorn

Joined: Aug 04, 2011
Posts: 7
The elements of the ArrayCollection can be used in bindings that will be continued to be monitored. This is not the case with the normal Array class, once the element from an array is used in a binding, it is no longer monitored. ArrayCollection provides a rich set of tools for data manipulation

According to the Adobe flex liveDocs ArrayCollection class is a wrapper class that exposes an Array as a collection that can be accessed and manipulated using the methods and properties of the ICollectionView or IList interfaces. Operations on a ArrayCollection instance modify the data source; for example, if you use the removeItemAt() method on an ArrayCollection, you remove the item from the underlying Array.


Flex Development | Flex Developer in India
 
 
subject: Difference between Array and ArrayCollection ?