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
500
Sum result is incorrect
posted

Hi all!

I have a very strange thing happining on my UltraWinGrid.

I have this colum with a sub-total in the bottom:

If you manual sum this column the correct value is 141.48.

I have several others sum in the grid, with the same code, but this is the only one with this problem.

------------------------------

Heres the code:

            UltraGrid1.DisplayLayout.Bands(0).Summaries.Add("Total SD.", Infragistics.Win.UltraWinGrid.SummaryType.Sum, UltraGrid1.DisplayLayout.Bands(0).Columns("Total SD."))

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Total SD.").DisplayFormat = "{0:#,##0.000€}"

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Total SD.").Appearance.BackColor = Color.LightBlue

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Total SD.").Appearance.TextHAlign = Infragistics.Win.HAlign.Right

 

            UltraGrid1.DisplayLayout.Bands(0).Summaries.Add("Valor SD.", Infragistics.Win.UltraWinGrid.SummaryType.Sum, UltraGrid1.DisplayLayout.Bands(0).Columns("Valor SD."))

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Valor SD.").DisplayFormat = "{0:#,##0.000€}"

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Valor SD.").Appearance.BackColor = Color.LightBlue

            UltraGrid1.DisplayLayout.Bands(0).Summaries("Valor SD.").Appearance.TextHAlign = Infragistics.Win.HAlign.Right

 

            ' Agrupar por grupos

            UltraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy

            UltraGrid1.DisplayLayout.GroupByBox.Hidden = True

            UltraGrid1.DisplayLayout.Bands(0).SortedColumns.Add("Tarifario", False, True)

            UltraGrid1.DisplayLayout.Bands(0).Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom _

                                                                Or Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.GroupByRowsFooter

 

Regards!
Hugo