10 Replies Latest reply on Mar 24, 2009 5:46 PM by Newsgroup_User

    Vertical XML Data Component?

    Level 1
      Anyone know of a component that I can use to display XML data in vertical columns, side by side for comparison without reworking the XML - something like a spreadsheet layout or any comparison tool you'd see on the web.

      thanks,
      Mark
        • 1. Re: Vertical Data
          Gregory Lafrance Level 6
          DataGrid ?
          • 2. Re: Vertical Data
            Level 1
            Awesome! Love that one word answer and the question mark makes it even better!

            It might be DataGrid, if I could set a vertical/horizontal like in a Tile.
            I've only been able to get the data to go horizontal in a DataGrid.
            ie;
            item1.1 item1.2 item1.3 item1.4 item1.5
            item2.1 item2.2 item2.3 item2.4 item2.5

            What I'm looking for is the data to list out vertically, in columns, side by side.
            ie;
            item1.1 item2.1
            item1.2 item2.2
            item1.3 item2.3
            item1.4 item2.4
            item1.5 item2.4

            thanks!
            Mark

            • 3. Re: Vertical Data
              Gregory Lafrance Level 6
              I think for that it would be necessary to iterate through the data and build the required XML or Object in code. I don't think there is a way to do it otherwise.

              And sorry for the short answer. Some people post and are not aware of some of the features of Flex :-)
              • 4. Re: Vertical Data
                Level 1
                Yeah - I've pretty much come to that conclusion. But, wanted to put it out there before I started and then found out there was some sort of simple solution once I was finished. I'm surprised there isn't a component that can do it. I would think it would be a very common way others would want to display data.

                Anyway - thanks for the reply and I was just joking about the short answer… it made me laugh and that's good.

                thanks again,
                Mark
                • 5. Re: Vertical Data
                  Gregory Lafrance Level 6
                  This code might stimulate some ideas:
                  • 6. Re: Vertical Data
                    Level 7

                    "Greg Lafrance" <webforumsuser@macromedia.com> wrote in message
                    news:gq90t6$353$1@forums.macromedia.com...
                    >I think for that it would be necessary to iterate through the data and
                    >build
                    > the required XML or Object in code. I don't think there is a way to do it
                    > otherwise.

                    Repeater and VBox


                    • 7. Re: Vertical XML Data Component?
                      Level 1
                      Greg - cool, thanks. That's better than the "reiteration" of the data.

                      Amy - thanks for the reply - would you do it the same as what Greg posted above or some other way?

                      thanks,
                      Mark
                      • 8. Re: Vertical XML Data Component?
                        Level 1
                        Ahhh - I forgot one thing. The rows have to be "connected". So when there's more than one line in the cell, and the height of that cell grows, the whole row has to grow with it, so all items remain aligned no matter how long the "table" gets.

                        I ran into this a few weeks ago when I started this project and had apparently forgotten about it.

                        thanks again for any help
                        M
                        • 9. Re: Vertical XML Data Component?
                          Level 7

                          "MarkF13" <webforumsuser@macromedia.com> wrote in message
                          news:gqbgq0$9ri$1@forums.macromedia.com...
                          > Greg - cool, thanks. That's better than the "reiteration" of the data.
                          >
                          > Amy - thanks for the reply - would you do it the same as what Greg posted
                          > above or some other way?

                          I hadn't seen his reply when I replied, but his is probably better than what
                          I'd have told you off the cuff...I probably would have just used two
                          repeaters side by side instead of two nested repeaters. His is more
                          extensible.


                          • 10. Re: Vertical XML Data Component?
                            Level 7

                            "MarkF13" <webforumsuser@macromedia.com> wrote in message
                            news:gqbjav$cne$1@forums.macromedia.com...
                            > Ahhh - I forgot one thing. The rows have to be "connected". So when
                            > there's
                            > more than one line in the cell, and the height of that cell grows, the
                            > whole
                            > row has to grow with it, so all items remain aligned no matter how long
                            > the
                            > "table" gets.
                            >
                            > I ran into this a few weeks ago when I started this project and had
                            > apparently
                            > forgotten about it.

                            Try doing it more like this then:

                            <Repeater id="rp" dataProvider="{_xlc.getItemAt[0]}">
                            <HBox>
                            <Label text="{(rp.currentItem as XML).text()}" />
                            <Label text="{(_xlc.getItemAt[1].child(rp.currentIndex) as
                            XML).text()}"/>
                            </HBox>
                            </Repeater>

                            HTH;

                            Amy