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
1615
Ultrawebgrid footers
posted

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.

Parents
No Data
Reply
  • 103
    posted

    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;

Children
No Data