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

Custom Aggregate Two Columns

2 Answers 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
George Felipe
Top achievements
Rank 1
George Felipe asked on 18 Mar 2010, 05:19 PM
Hello,

Currently I am trying to add a Custom Aggregate to get the Sum Aggregate of two columns and divide them to get a percentage, however, I want to show them on the grouped row, NOT in the footer. I have seen examples of how to do it on the group footer, but not on the actual group row.  So basically what I want is (Sum(SourceField1) / Sum(SourceField2)) * 100.

I have tried to use the example as a starting point but I can't seem to get my head around it.

Please help.

Thanks,
George

2 Answers, 1 is accepted

Sort by
0
George Felipe
Top achievements
Rank 1
answered on 22 Mar 2010, 03:09 PM
I wish to pose this question again because it is important that I get an answer (or pointed to an answer). Again, I wanted to create a Custom Aggregate that gets the Sum of two columns, and then divides them by each other. However, I am having trouble in implementing this since the example in the Telerik Silverlight demo only does it with one column. I would greatly appreciate some help.

Thanks,
George
0
Pavel Pavlov
Telerik team
answered on 23 Mar 2010, 03:20 PM
Hello George Felipe,

The attached project demonstrates a way to have a custom aggregate function over two fields. Please use it as a starting point and let me know in case you need further assistance.

Best wishes,
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.
Tags
GridView
Asked by
George Felipe
Top achievements
Rank 1
Answers by
George Felipe
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Share this question
or