Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Display summary according to group by clause
posted

Hi

 I need help in getting the summary to display according to the result from a group by statement. for example;

select sum(spotcost),currency from msaspotsearch_view where currency is not null group by Currency

 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

 

Parents
No Data
Reply
  • 469350
    Offline posted

    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. 

Children