Wednesday, October 15, 2008

Dynamic Array Collection Using Flex

We can create dynamic Array Collection in flex using following code.

var ob:Object;
var n:String = "Name";
var a:String = "Address";
var ar:ArrayCollection = "";

ob = new Object();

ob[n] = "Ar";
ob[a] = "xyz, UK";

ar = new ArrayCollection();
ar.addItem(ob);


It binds data into array just like.

arrayCollection = [{Name:'Ar',Address:'xyz, UK'}];

setPropertyIsEnumerable() is use to hide ArrayCollection item. which we can use like.


ar.setPropertyIsEnumerable("Name",true);


After using above method we can hide array collection item.

No comments:

Post a Comment