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;