Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
2.50/5 (2 votes)
Hello
I have a ASPxGridview like this;
http://i.stack.imgur.com/9NZBa.png[^]
Is there any way calculate Total of GroupSummary to TotalSummary without Grouping.

GroupSummary's SummeryType="AVERAGE"
For Example;
MUS_K_ISIM   GroupSummary[RISK_EUR]
2M LOJİSTİK  123.456 
ABA LOJİSTIK 234.567 

Then I want TotalSummary of RISK_EUR column is 123.456 + 234.567 = 358023
How can i do that?
Best Regards,
Soner

NOTE: I only want this calculation with normal Gridview. Not doing with Grouping.
EDIT: For example;
Customer_No Customer_Name Price
123         aaa           50
123         aaa           100
123         aaa           60
124         bbb           60
125         ccc           20
125         ccc           40


I want with that grid,
What is avarage of 123 number customer = 50 + 100 + 60 = 210/3= 70
What is avarage of 124 number customer = 60/1=60
What is avarage of 125 number customer = 20 + 40 = 60/2= 30
And then TotalSummary of Price is = 70 + 60 + 30 = 160

How can i do that? Or what is this code about? Which function should i use?
Posted
Updated 15-May-11 3:18am
v3
Comments
Karthik. A 15-May-11 16:36pm    
Best thing to do would be to approach devexpress support, they are extremely quick in responding to questions - http://www.devexpress.com/Support/Center/.
Soner Gönül 15-May-11 16:54pm    
Quick, really? They are slower than turtle.
Karthik. A 15-May-11 20:47pm    
Hmmm, that's surprising. I have been using their support forums for over a year. If you expect your questions to be answered in an hour, i don't think that's going to work.

1 solution

I read your question again. Why don't try this? For the ASPxSummaryItem w/in TotalSummary that has to display this, set it to custom, then handle the OnCustomColumnSummaryText event. Here get the ASPxGridView's data source and calculate the average's group wise and then overall average by using LINQ and then just set the summary text.

Hope this helps!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900