This is a migrated thread and some comments may be shown as answers.

[Solved] Calc $Margin in Footer

2 Answers 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
bradley baker
Top achievements
Rank 1
bradley baker asked on 09 Nov 2009, 06:21 PM
Im trying to calc PV/Margin in the Group footer.  I have a CalcField that Calcs the PV/Margin correctly but now I want to get the total for their groupings.

I tried the SUM aggregate but it doesnt come out correct.  I didnt see any examples with a Custom aggregate.

        <telerik:GridCalculatedColumn DataType="System.Double" DataFields="DayFig,ExtCost" HeaderText="PV"   
           UniqueName="PV" Expression="(({0}-{1})/{0})" DataFormatString="Avg : {0:p}" Aggregate="SUM">  
        </telerik:GridCalculatedColumn> 

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Nov 2009, 11:30 AM
Hello Bradley,

Check out the following online demo which illustrates on how to use custom aggregates fro columns in the grid:
Footer Aggregates

You can also refer to the following document which explains on how to display totals in grid footer. Probably you can modify the logic to display group totals in the GridGroupFooter item:
Totals in grid footers

Thanks
Princy.
0
bradley baker
Top achievements
Rank 1
answered on 11 Nov 2009, 05:12 AM
Is there a way for me to refrence the values of two other grouped footers?  IE the Sales and Cost.  There seems to be alot of overhead using the below examples.  Especially when Im dealing with 500k rows.  Its faster to do the PV calculations in SQL than on the client/server so I try to do most of my calcs there.
Tags
Grid
Asked by
bradley baker
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
bradley baker
Top achievements
Rank 1
Share this question
or