开发者

FLEX: how to limit the number of items in the Repeater object

I'm using a Repeater object in Flex. Would be possible to stop the repeater after 50 iterations.开发者_Go百科. even if my dataProvider is bigger ?

I want to display only the first 50 items. I'm using MXML to implement the repeater.

thanks


you can use Repeater's count property to specify how many times it should execute. You can also specify startingIndex, to let the repeater know where to start.

So,show first 50 elements you use:

<mx:Repeater id="myrep" dataProvider="{myAC}" count="50">

to show for example 100-150 you do:

<mx:Repeater id="myrep" dataProvider="{myAC}" count="50" startingIndex="100">

Hope it helps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜