4 Replies Latest reply on Nov 20, 2008 9:31 AM by Newsgroup_User

    Summary from ArrayCollection

    rsarma
      Hi!
      I have been trying to see if there is a way to create summary data with grouping columns so that the summary data could be used with components other than AdvancedDataGrid (like charts etc.). I have flat data (about 5K rows with 20 columns) in an ArrayCollection and need to slice the data about five different ways for charts.
      I could do it manually while iterating through the collection (or get aggregated datasets from by BlazeDS service) but I was wondering if there is an existing grouping function that could be used.
      I'm not even sure if it is a good to do all the aggregation on the client (i have a feeling it will take too long) - would I be better of getting the aggregated data from the server?

      Thanks,
      Ram
        • 1. Re: Summary from ArrayCollection
          Level 7

          "rsarma" <webforumsuser@macromedia.com> wrote in message
          news:gg2eqg$h15$1@forums.macromedia.com...
          > Hi!
          > I have been trying to see if there is a way to create summary data with
          > grouping columns so that the summary data could be used with components
          > other
          > than AdvancedDataGrid (like charts etc.). I have flat data (about 5K rows
          > with
          > 20 columns) in an ArrayCollection and need to slice the data about five
          > different ways for charts.
          > I could do it manually while iterating through the collection (or get
          > aggregated datasets from by BlazeDS service) but I was wondering if there
          > is an
          > existing grouping function that could be used.
          > I'm not even sure if it is a good to do all the aggregation on the client
          > (i
          > have a feeling it will take too long) - would I be better of getting the
          > aggregated data from the server?

          You can use GroupingCollections however you want. I didn't do summary rows,
          but check out this example:
          http://flexdiary.blogspot.com/2008/09/groupingcollection-example-featuring.html


          • 2. Re: Summary from ArrayCollection
            rsarma Level 1
            Hi Amy,
            Thanks a bunch for your example - Definitely sheds a lot of light on the GroupingCollection objec. However, I still can't figure out how to use the SummaryRow if I define one (seems to be specific to advanced data grid since it uses placement etc.). I am new to flex and have only been using it for a couple of days now.
            • 3. Re: Summary from ArrayCollection
              rsarma Level 1
              If i use summaryPlacement="group" I can access it through the getRoot() function. Is this documentation hard to find or is it just me (granted I have only been using flex for a few days now)?
              • 4. Re: Summary from ArrayCollection
                Level 7

                "rsarma" <webforumsuser@macromedia.com> wrote in message
                news:gg42bd$k1l$1@forums.macromedia.com...
                > If i use summaryPlacement="group" I can access it through the getRoot()
                > function. Is this documentation hard to find or is it just me (granted I
                > have only been using flex for a few days now)?

                When I did the example, I spent a lot of time in the language reference in
                the GroupingCollection, Grouping, and GroupingField. If you've only been
                using Flex a few days, you might find this useful:

                http://flexdiary.blogspot.com/2008/07/getting-help-in-flex-builder.html

                I think that the Flex team did not intend for people to use these classes
                outside of ADG, but I find them extremely useful in all kinds of other
                situations. Sorry I can't offer more specific help.

                -Amy