Using ultrawebgrid with footers shown and using
UltraWebGrid1.Columns(4).FooterTotal = Infragistics.WebUI.UltraWebGrid.SummaryInfo.Avg
to calculate averages. need to be able to round and truncate results to 2 decimal places. Not sure how to do it.
It can be done some thing like the below code in InitializeLayout event of the UltraWebgrid.
Code sample:
clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").Header.Caption = "Total Due"; clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").CellStyle.HorizontalAlign = HorizontalAlign.Right; clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").SortIndicator = SortIndicator.Ascending; clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").Width = Unit.Percentage(12); clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").Format = String.Format("c"); clientInvoiceReportUltraWebGrid.Columns.FromKey("Total_Due").Footer.Total = SummaryInfo.Sum;
That did it! Thank you Georgi!
Hello jcom39201,
Yes this was helpful. I have created a sample on your behalf with the specified version. You can find it attached and download it for review. I hope this helps. I used the data in your grid in order to reproduce it. You can set the Format for the whole column to be “###.##” which will solve your issue.
Let me know if you have further questions with this matter,
Sincerely,
Georgi Sashev
Developer Support Engineer
Infragistics, Inc.
http://es.infragistics.com/support
Using...
Infragistics35.WebUI.UltraWebGrid.v9.2, Version=9.2.20092.1003
does this help?
Can you specify which version are you using, which build? I will need to create a sample in order to investigate this and I will need this information.
Looking forward hearing from you.