Thursday, February 11, 2010

Flex 3 (Halo) Item Renderers in a Flex 4 (Spark) World

Why would anyone mix Flex 3 Item Renderers w/ Flex 4?

There isn't an out-of-the-box equivalent for the DataGrid component available in Spark. You may want a particular cell of your DataGrid to be rendered in a custom fashion. You may try to use a Spark Item Renderer which implements mx.controls.listClasses.IListItemRenderer but that will only render the initial list properly. When you try to scroll it at runtime will give you Error #1010: A term is undefined and has no properties. So you will need to use Halo Item Renderer.

But wait, where is the Halo equivalent for an Item Renderer in the Gumbo API?
Its called mx.controls.listClasses.ListItemRenderer, but it can't act as a container so there are inherent limitations to how much you can do with it.


Post a Comment