Saturday, August 14, 2010

Flex List Item Renderer Repetition

The Flex implementation of lists, data grids, and advanced data grids generate a fixed amount of item renderer components that usually match the first visible set of elements in the list.
This implementation might cause that elements in the list seem to repeat them selves once you scroll down.

This is because although the items data is different, since its display object hasn't been properly refreshed, it shows the data it has from its previous appearance.
To solve this follow these guidelines:
1. do not set data inline i.e. mx:label text="{data.text}"
2. implement the renderers updateDisplayList method to set all the data in place

that's it,
good luck

No comments:

Post a Comment

Please do not post spam on this blog, Spam sites will be reported to google.
thank you kindly.