Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Array and ArrayCollection ?

 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
IntelliJ IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 397
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks sergio
 
Andrew flexdeveloper
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic