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
Hi,
So unless I am missing something, you are creating the exact same summary in the same way for both columns.
There must be some difference between the two column aside from the summaries.
What is the DataType of each column?
Does it make any difference if you do not set the DisplayFormat?
Are filtering the grid or hiding any rows in the grid?
Got it!
On the SQL query I had "0" AS [Valor SD.] instead "0.00" AS [Valor SD.], making the DataType int.
Thanks!