0 Replies Latest reply on May 26, 2008 10:08 PM by Pratap Reddy

    How to create summaryRow for HeirarchicalData in AdvancedDataGrid?

    Pratap Reddy
      Hi,
      Am working with AdvancedDatagrid..
      Following arraycollection i used as Heirarchical Data for Dataprovider of ADG.

      [AS]private static var dpHierarchy:ArrayCollection = new ArrayCollection([
      {Region:"Demand",
      children: [
      {Region:"Forecast",
      children: [
      {Region:"Gross Forecast",
      children: [{Region:"Open Forecast"}]},
      {Region:"Net Forecast", value:"20"}]},
      {Region:"Actual",
      children: [
      {Region:"Sales Order",
      children: [
      {Region:"Collaboration",
      children: [
      {Region:"Negotiation", value:"100"},
      {Region:"Authorization", value:"200"},
      {Region:"Published", value:"300"},
      ]},
      {Region:"Open", value:"400"}]
      },
      }]);[/AS]


      output looks like this...


      >Demand
      >Forecast
      >Gross Forecast
      -Net Forecast 20
      >Actual
      >Sales Order
      >Collaboration
      -Negotiation 100
      -Authorization 200
      -Published 300
      Open 400


      Now what am looking for is need to get the summaryRow at parent level...Each and every parent level should have SUM of its child.
      i need something like this...

      >Demand 1020
      >Forecast 1020
      >Gross Forecast 1020
      -Net Forecast 20
      >Actual 1000
      >Sales Order 1000
      >Collaboration 600
      -Negotiation 100
      -Authorization 200
      -Published 300
      Open 400

      I created ADG using actionscript. I didnt used MXML tags.
      Now i need to create SummaryRow using Action script only.
      Any idea how to do this??

      Thanks in Advance
      Pratap