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

Calculated Column Footer

2 Answers 42 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 18 Apr 2010, 07:55 PM
In my GridView, I have 3 columns.

1. Quantity
2. Amount
3. Percentage (Amount/Quantity)

For the detail records, I am able to calculate the Percentage value in my business object. I was able to add column totals for Quantity and Amount; however, I cannot find a way to do the Percentage calculation. The Percentage calculation is SUM(Amount) / SUM(Quantity). Is this possible? How do I add a column total that is a calculation based on other column totals?

Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Pavel Pavlov
Telerik team
answered on 20 Apr 2010, 12:08 PM
Hello Steve,

You can achieve this by using a custom aggregate function.
The attached sample demonstrates such function in action .

Let me know if you have any troubles adapting this to your project.

Greetings,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Mark
Top achievements
Rank 1
answered on 01 Apr 2011, 05:12 PM
Must every solution require a download?
Tags
GridView
Asked by
Steve
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Mark
Top achievements
Rank 1
Share this question
or