Mar 16

[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

Post to Twitter

One Response to “Binding custom objects to Tilelist with itemRenderer”

  1. Akeem says:

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

Leave a Reply

 
preload preload preload