
Robert Jakech
Top achievements
Rank 1
Robert Jakech
asked on 09 Mar 2010, 11:51 AM
Dear Team,
I have a RadGrid in which i group all the items and totals like below
GROUP:Income
ItemName Amount
Housing 20000
Allowance 40000
TOTAL INCOME 60000
GROUP:Deduction
Transport 10000
Coffee 10000
TOTAL INCOME 20000
Net(TOTAL INCOME-TOTAL DEDUCTION):40000
Right now, I can do the grouping on my RadGrid, but can't
A). Display Group Total as show above(I can display something like TOTAL:60000). I want the total Format to be like shown above
B).Get the difference between TOTAL INCOME - TOTAL DEDUCTIONS.
Please can some help me
(i).FORMAT group sum of each group with different name e.g TOTAL DEDUCTION,TOTAL INCOME other than displaying the same name.
(ii). Compute the difference between the TOTAL INCOME-TOTAL DEDUCTION and call it 'NET'
I would also be glad to look at any demo.
Robert
TX.
6 Answers, 1 is accepted
0

Shinu
Top achievements
Rank 2
answered on 11 Mar 2010, 02:04 PM
Hello Robert,
One suggestion would be using Custom option for Aggregate property, which in turn raises OnCustomAggregate event where the custom result can be set using the e.Result argument. You can calculate the value from code behind and set the Footer text for GridGroupFooter/GridFooter.
Checkout the following links to know more on Aggregate.
-Shinu.
0

Robert Jakech
Top achievements
Rank 1
answered on 11 Mar 2010, 04:45 PM
Thanks alot.
Will try it out. What other options other than using CustomAggregate can i use?
Robert.
0

NVB
Top achievements
Rank 1
answered on 20 Nov 2011, 05:31 AM
Robert,
Do you have any working example .
Anybody can you please give sugesstions on how to do this
I have the situation exactly as Robert mentioned.
Thanks
Do you have any working example .
Anybody can you please give sugesstions on how to do this
I have the situation exactly as Robert mentioned.
Thanks
0

Shinu
Top achievements
Rank 2
answered on 21 Nov 2011, 04:41 AM
0

NVB
Top achievements
Rank 1
answered on 21 Nov 2011, 08:32 PM
Thanks for the reply.
I have grid grouped on 2 levels DEPT and ACCOUNT TYPE ( EXPENSE and REVENUE) and also calcualting Totals of Company
Each ACCOUNT TYPE has list of items which will have total and NET -Expense total - income Total
Something on the following lines
Department: HR | ||||||
Accct TYPE : Expense | ||||||
Item aa | 1000 | |||||
item bb | 2000 | |||||
item cc | 3000 | |||||
item dd | 4000 | |||||
ExpenseTotal | 10000 | |||||
Accct TYPE : REVENUE | ||||||
item ww | 2000 | |||||
item qq | 1000 | |||||
Revenue Total | 3000 | |||||
NET | 7000 | <---- total expense- totalincome | ||||
Department:Marketing | ||||||
Accct TYPE : Expense | ||||||
Item aa | 4000 | |||||
item bb | 1000 | |||||
item cc | 2000 | |||||
item dd | 1000 | |||||
ExpenseTotal | 8000 | |||||
Accct TYPE : REVENUE | ||||||
item ww | 1000 | |||||
item qq | 2000 | |||||
Revenue Total | 3000 | |||||
NET | 5000 | |||||
Company Cost | 12000 | <-Total Expense - Total Income |
0
Hello Vemula,
Unfortunately the RadGrid does not support build in the desired functionality. You could not have different aggregates on different group levels. However you could try using the custom aggregates as suggested in the other posts, calculate the needed values and then assign it to the group footers cells.
All the best,
Radoslav
the Telerik team
Unfortunately the RadGrid does not support build in the desired functionality. You could not have different aggregates on different group levels. However you could try using the custom aggregates as suggested in the other posts, calculate the needed values and then assign it to the group footers cells.
All the best,
Radoslav
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now