Use "removeItemAt()" function to remove an item from the array collection.
example:
private var ac:ArrayCollection = [ {id: 101, name:'John', status : 'Married'},
{d: 102, name:'Steven', status : 'Single'} ];
private function init():void
{
for( var s:String in ac )
if( ac[s].status == 'Married' )
ac.removeItemAt(int(s));
}
example:
private var ac:ArrayCollection = [ {id: 101, name:'John', status : 'Married'},
{d: 102, name:'Steven', status : 'Single'} ];
private function init():void
{
for( var s:String in ac )
if( ac[s].status == 'Married' )
ac.removeItemAt(int(s));
}
No comments:
Post a Comment