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
4618
How to display UltraGrid column summaries without the preceding text
posted

I am using an UltraGrid with a summary for one of its columns; however, currently the summary row displays as "Sum = <value>". How do I display just the value, without the summary text?

  • 4618
    Verified Answer
    posted

    By default, the UltraGrid’s column summary will include text within the summary row which indicates the formula type used for calculating the value. This text can be omitted explicitly by modifying the DisplayFormat of the summary within the InitializeLayout event handler of the UltraGrid.

    You will need to supply a substitution string that will be used to format the summary as demonstrated in the following sample code.

    void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
            {
                //Explicitly display only the summary’s value, without the preceding text
                e.Layout.Bands[0].Summaries[0].DisplayFormat = "{0}";
                //Note: by default the DisplayFormat string in this scenario would be "Sum = {0}"
            }

    Sincerely,
    Chris K
    Developer Support Engineer
    Infragistics, Inc.
    www.infragistics.com/support