7 Replies Latest reply on Dec 21, 2009 10:52 AM by Francisc

    Tables in Flex

    Francisc Level 3

      Hello!

       

      How can I draw tables in Flex please?

        • 1. Re: Tables in Flex
          oldMster Level 3

          Depends on what you are trying to accomplish.  For some HTML table uses, a Datagrid makes sense, for some others, a Grid or Tilelist may be the best.  Tables in HTML are used for so many formatting reasons, and few actual 'tables' seem to made with them..

          Mark

          1 person found this helpful
          • 2. Re: Tables in Flex
            Francisc Level 3

            I genuinely mean a table - black border with white background.

            Is this possible?

            • 3. Re: Tables in Flex
              oldMster Level 3

              Maybe I'm dense (it has been suggested by a large number of people), but I don't understand what you want - if all you want is a white square with a black border, you can do that with Canvas, HBox, VBox, and setting the color attributes appropriately.  A table typically has rows, columns, and possibly grid lines separating them. If you want to display data, then you might want a list control inside the box, or if you want a spreadsheet like presentation, then the datagrid would probably be what you want.

              Mark

              1 person found this helpful
              • 4. Re: Tables in Flex
                Francisc Level 3

                What I am looking for is a classic table like the HTML one to display data with no interactivity and printer friendly: some columns, some rows, black border and white background.

                 

                I can use any of the HBox, VBox, Canvas containers, but it would seem bad coding to me to use one for each TD.

                • 5. Re: Tables in Flex
                  oldMster Level 3

                  For what you describe, a datagrid would likely be the best tool.  You can change the appearance either directly, or by using CSS - much like HTML.  The main difference between a datagrid and a table is that in a datagrid, each 'cell' is not independent, and it is truly a data presentation tool, not a formatting tool.  In an HTML table, every defined cell is created with all of it's formatting.  In an datagrid, a visual object is only created for the visible items, and as the data is scrolled back and forth (if scroll bars are used), and the visual objects are reused to display the new 'set' of rows exposed by the scroll events.

                  Mark

                  • 6. Re: Tables in Flex
                    Francisc Level 3

                    Thank you Mark! Sorry if I was a bother.

                     

                    • 7. Re: Tables in Flex
                      oldMster Level 3

                      No bother, glad to help!

                      mark