« Dynamically adding children to a tree | Main | Google Finance launched with Flash charting + AJAX »

Binding custom objects to Tilelist with itemRenderer

[The following was created as of Flex 2, Beta 2]

It's not uncommon to want to bind a class to one of the List based components (i.e. List, TileList, DataGrid, etc). But if you're using an itemRenderer you may run into an issue where the itemRenderers do not get unique id's. When this happens, focus and selection cannot function properly. Usually, just one of the items in the list will get highlighted no matter which item your cursor is over.

So the way to get around this, is to simply have your class implement IUID which will automatically assign a unique id to each item renderer.

Here's a sample:

View the source here
Save This Page    

Comments

Thanks for the heads up. Saved me a couple hours of trying to figure out what the hell was up.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)