Is it possible to have multiple summary rows in a single band. I have data like below and need to show Summaries as Subtotal for each unique ColA value. Is it possible to show as below without manupulating data in underlying datasource.
Thank you
ColA ColB Col C
1 a 2 1 b 51 c 3
SubTotal 10
2 x 12 z 2
SubTotal 3
3 i 43 j 103 k 43 i 5 Subtotal 23
What you can do is apply a summary to Col C, then use the OutlookGroupBy feature of the grid and group by Col A.
Set grid.DisplayLayout.ViewStyleBand to OutlookGroupBy. Then use the SortedColumns.Add method on the Band to sort column A and specifiy true for groupBy.
COL A COL B COL C
A1 B1 C1
A1 B1 C2
summary C1+C2
A1 B2 C3
A1 B2 C4
summary C3+ C4
A2 B4 C5
A2 B4 C6
summary C5+ C6
Is it possible to get summary at COL A level also i.e. C1+C2+C3+C4 & C5+C6
and at top level also i.e C1+C2+C3+C4+C5+C6
Hi,
I'm afraid I do not understand your question. Is this related to the original question posted here about WebGrid? Or are you asking a new question about WinGrid?
The only way to do what you have shown here in the WinGrid is to use OutlookGroupBy to group the data. That way you would get a summary for each group. You can also have a grand total summary by setting the SummaryDisplayAreas and adding in the FixedOnBottom flag, I think.
As for summaries across some groups and not other, no, there's no functionality in the WinGrid for that. But you could apply multiple levels of grouping and you would get summaries on each level.
Thanks for your reply. My actual question was like , I have two level of grouping .
I am able to get the summary at inner level. Is it possible to get summary at second level also and grand total summary for both the levels ?
I made a chart to explain you the problem.
Header
Item Row 1
20
Item Row 2
30
Level 1 Summary
50
10
40
90
Level 2 Summary
170
2
3
5
1
4
9
17
Grand Total
187
I am able to get the summaries in the red color rows. But I don't have any idea about how to get the summaries in green and purple color rows.
I wil try the solution that you have suggested.
Thanks,
AniLex
And Mike I am using UltraWebGrid. The solution you suggested is for UltraWinGrid.
Can I get the above functionality in UtraWebGrid?
Sorry Mike, I posted this in wrong forum.
Thanks for your support.
As I mentioned to the poster above who was asking about WebGrid, this is the WinGrid forum. You need to post your question in the WebGrid forum. I'm afraid I know next to nothing about the WebGrid.