I thought the ADG has a SummaryRow feature.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Merle Reine
Sent: Tuesday, January 15, 2008 2:21 AM
To: [email protected]
Subject: Re: [flexcoders] Datagrid - Adding Running Total Row

 

You need to use the server for calculations.  Use a database query
(mysql?) to grab the datagrid data and total and export to xml.  then
use the xml for the datagrid.

example
<xml>
<data>
  <header> 
     <1>Order Number</1>
     <2>Quantity</2>
     <3>Price</3>
  </header>
  <items>
    <item1a>1</itema>
    <item1b>4</item1b> 
    <item1c>25.00</item1c>
  </items>
  <items>
      <item2a>1</item2a>
      <item2b>3</item2b>
      <item2c>12.25</item2c>
  </items>
  <quantity total>7</quantity total>
  <price total>37.25</price total>
</data>
</xml>


Hope that makes sense as It is 2am and I am going back to bed. 

I assume you are using php and mysql of course because who isn't.  ;)




On Jan 14, 2008 2:21 PM, Jehanzeb Musani <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

Hello,

I need to know that whether DataGrid or
AdvancedDataGrid in Flex supports running totals? Let
say I have the following data.

Order Number Quantity Price
---------------------------
1..............4......25.00
2..............3......12.25
3..............11.....10.00
----------------------------
3..............18.....246.75
----------------------------

The dataprovider contains the first three rows of the
aforementioned table. The requirement is that the grid
should calculate the total of the data in the
dataprovider.

I can manually add the running total row in the data
provider so that grid can display that row. But the
next requirement is that the running total row should
be displayed in different backcolor, forecolor and
font.

Can you tell me how can I implement the running total
functionality in Flex?

Regards,
Jehanzeb

__________________________________________________________
Never miss a thing. Make Yahoo your home page. 
http://www.yahoo.com/r/hs <http://www.yahoo.com/r/hs> 




-- 
Merle Reine
Email Address: echo [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
| perl -pe 'y/a-z/n-za-m/' 

 

Reply via email to