I need to display the number of items in a List component that has a filtered ArrayCollection as its data provider. I don't see a way to get the filtered collection's length. Anyone know? Thanks.
Asked
Active
Viewed 3,157 times
1 Answers
5
Considering the code:
var ac:ArrayCollection = new ArrayCollection([0,1,2,3,4,5,6,7,8,9]);
ac.filterFunction =
function(item:*):Boolean{
return item > 3;
};
ac.refresh();
You use ac.length
to get filtered data length (6) and ac.list.length
to get raw, unfiltered data length (10).

2DH
- 1,648
- 2
- 10
- 19
-
Thanks! I was trying that, but querying DURING the filter function instead of after the call to refresh(). Now it's working fine. – JackFreud Nov 22 '10 at 14:50