Hi
I need help in getting the summary to display according to the result from a group by statement. for example;
select
EUR - 113700.00 GBP - 35650.96 HKD - 267625.00 RM - 424.00 RMB - 42250.00 USD - 1700.00
how can i display the summary exactly like the result shown?
I've tried adding this bit here...
Dim sumCurrency As Infragistics.Win.UltraWinGrid.SummarySettings = band.Summaries.Add("SpotCost" & strCurrency, Infragistics.Win.UltraWinGrid.SummaryType.Sum, New SpotCost(dsSpot), band.Columns("Currency"), Infragistics.Win.UltraWinGrid.SummaryPosition.Left, Nothing)
but this one will only appear for a row..can i loop the dataset in the InitializeLayout and how can i create the 6 row item in the summary?
Thanks,
Ainey
Hi Ainey,
I'm afraid I do not understand your question. Are you asking how to group the grid using the OutlookGroupBy feature? You would do this by setting the grid's ViewStyleBand to OutlookGroupBy and using the band.SortedColumns.Add method. Once the grid is grouped, the summaries will show up in each GroupBy row and be based on the values in that group.
Hi Mike,
Thanks for quick reply. =) Ok for example i have this set of data;
Spot Currency Cost
---------------------------------------------
A HKD 100
B HKD 50
C RMB 100
D USD 50
E USD 25
Then i want the summary to look like this
Total Spot = 5
Total Spot Cost (HKD) = 150
Total Spot Cost (RMB) = 100
Total Spot Cost (USD) = 75
I manage to display the Total Spot but the Total Spot Cost will display 325 it just sum everything without grouping it by Currency. Below is my code. i tried what you have suggested by using Viewstyleband. I guess i just dunno how to use it.. kekekeke...
band.SortedColumns.Add(columnTogroupBy,
summarySpotCost.DisplayFormat =