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
精彩评论