6 Replies Latest reply on Dec 22, 2010 5:56 PM by dupred

    How to convert DataServices.Result into an Arraylist or ArrayCollection?

    dupred Level 1

      I want to use an ArrayCollection or an ArrayList as a data provider

      for a dataGrid, and then later in a Graph.

       

      The problem is that the starting point is the FLEX Builder 4 created "datasource.lastResult" value Objects.

       

      I don't know how to access anything but the Column names.

       

      The fields returned are:

       

           gmtdate,hostname,CPUBusy

       

      I want to show CPU busy for "N" number of hosts.

       

      So I need to change my result from the SQL query in Action Script into:

          gmtdate, hostname1_CPUbusy, hostname2_CPUbusy, hostnameN_CPUbusy

       

      Are there any samples of how to convert the .lastResult into an ArrayList?

       

      The result set is Object based and I can't figure out how to read it.

       

      Thanks,

      David