Here is the simple Flex ArrayCollection FilterFunction example to ignore blank records (name) form arrayCollection.
Now filtered ArrayCollection object use further code.
var ac=new ArrayCollection();
ac.addItem({name:'abc'});
ac.addItem({name:'xyz'});
ac.addItem({name:''});
ac.addItem({name:'dac'});
// use of fillter function
ac.filterFunction = function(item:*):Boolean{
return (StringUtill.trim(item.name)!=""); //
}
ac.refresh();
Now filtered ArrayCollection object use further code.
thanks!...that's what i was looking for! :)
ReplyDelete