views:

33

answers:

1

So, I'm new to Flex 4 and have been doing the Flex in a Week crash course online.

I need some help trying to build a dynamically growing or shrinking table with columns and rows. The cell backgrounds of the table will change color depending on an XML file.

Sometimes a picture is worth a thousand words: http://drop.io/v0woo7w (password: flex)

So, see that table at the top with green and blue and red squares? What is the best approach to designing that? I'm thinking maybe the AdvancedGrid control... is that the right way to go about it?

A: 

More than likely, your best approach is to roll your own component to do this. The baggage that comes along with the Datagrid (or even worse the ADG) is likely to hinder rather than help.

Gregor Kiddie
Blueplastic
I'd read up on the Flex lifecycle to begin with (especially Deepa's talk at MAX 2008 http://tv.adobe.com/watch/max-2008-develop/creating-new-components-in-flex-3-by-deepa-subramaniam/).At the most basic level, either draw rectangles directly onto your component using the graphics classes in updateDisplayList(...) or have another component for the rectangle and just lay them out.Just noticed that you are looking at Flex 4. You might want to take a look at the DataGroup also. http://help.adobe.com/en_US/FlashPlatform//reference/actionscript/3/spark/components/DataGroup.html?allClasses=1
Gregor Kiddie