This content has been marked as final. Show 3 replies
Yes. item renderers are "recycled". Flex only creates enough for the visible rows. When you scroll, the item data for the scrolled-into position item is sent to the renderer(through the set data() setter), which must use that data to render its visible state.
This means all aspects of the item renderer must be data driven. You cannot do an data oriented work in initialize or creation complete, but must override the set data() method. Best practice is actually a bit more complicated thatn that. You will have toset the selectedIndex of the renderer combobox from some value stored in the item.
Google: Alex Harui item renderer recycle
For a full explanation and examples.
An additional piece of advice: Do not attempt to create an itemRenderer from scratch. Find an example and modify it.