3

我需要显示具有过滤的 ArrayCollection 作为其数据提供者的 List 组件中的项目数。我看不到获得过滤集合长度的方法。有人知道吗?谢谢。

4

1 回答 1

5

考虑代码:

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();

您用于ac.length获取过滤后的数据长度 (6) 并ac.list.length获取原始的、未过滤的数据长度 (10)。

于 2010-11-19T15:02:50.780 回答