The ItemRenderer class in Flex 4 has an itemIndex property that was added after beta2. You can use this property within your item renderer to display the row number or index of an item in a spark List.
Read more…
ItemRenderer has logic built in that changes between some standard states like normal, hovered, selected, etc. You can supplement this logic by overriding ItemRenderer.getCurrentRendererState(), or do away with the built in states altogether by subclassing DataRenderer instead of ItemRenderer.
Read more…
I recently created a form in Flex that required using multiple DropDownLists with a custom item renderer that loads in preview images of each item. This was really easy to do initially, but I noticed a couple performance issues that bothered me. I decided to improve the performance by implementing a simple caching strategy.
Read more…
This post looks at a couple ways of defining a custom item renderer on a DataGroup, but it also applies the same way to a SkinnableDataContainer, spark List, and any other spark components that support item rendering.
Read more…
It’s easy to delete an item in a spark List from within an item renderer. This is handy if you have a List with a custom renderer that provides a button to delete the item that is associated with that renderer.
Read more…
The spark DataGroup component is designed to take data items and pass them through an item renderer to create a visual representation of that data. In Flex 4 it is very easy to build custom item renderers.
This sample application demonstrates how you can create an item renderer that only shows some information by default and allows the user to drill down to see more information by clicking on an item or it’s associated “twisty” icon.
Read more…