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

Aggregate to compare two columns

1 Answer 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Derek
Top achievements
Rank 1
Derek asked on 06 Sep 2010, 09:00 PM
My team is using a RadGrid for a dataset that returns multiple columns of numbers, and there are some calculated colums to return the % of total for each column. The calculated expressions are working properly in the row, but I'd like to get the total percentage. None of the aggregate functions work; I don't want a total of the percentages, I want the same calculation done on the total values as is being done on each row. See the screenshot for a better explanation; I'd like summary percentages where each of the arrows are.

Is there any way to accomplish this without some complicated coding in the OnCustomAggregate event? It seems like a pretty straightforward requirement.




1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 07 Sep 2010, 07:03 AM
Hello Derek,

To achieve this functionality access the GridFooterItem for the corresponding column in ItemDataBound event. Then compute the necessary calculation and assign the result to the footeritem of corresponding GridCalculatedColumn by using its ColumnUniqueName.

The following documentation will help you to accessing the grid footer cell.
Accessing cells and rows

Thanks,
Princy.
Tags
Grid
Asked by
Derek
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or