Skip to content

Ultragrid summary basic guide

New Discussion
Craig Nicholas
Craig Nicholas asked on Mar 30, 2020 6:25 PM

Hi

I’d like to learn the basics of how to create and use summaries in UltraGrid in code.

I’ve looked in the documentation but it only focuses on special use cases.

Where is the best place to find a basic guide?

Thanks

Sign In to post a reply

Replies

  • 0
    Michael Peterson
    Michael Peterson answered on Mar 27, 2020 2:34 PM

    Hello Craig,

    Thank you for contacting Infragistics Developer Support!

    Summaries can be enabled at the band of column level, you can see the following on the AllowRowSummaries properties on those at the following links:

    http://ko.infragistics.com/…/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.ultragridoverride~allowrowsummaries

    http://ko.infragistics.com/…/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.ultragridcolumn~allowrowsummaries

    http://ko.infragistics.com/…/infragistics.win.ultrawingrid~infragistics.win.ultrawingrid.allowrowsummaries

    Do you have any specific questions about summaries?

    • 0
      Craig Nicholas
      Craig Nicholas answered on Mar 27, 2020 2:42 PM

      Hi Michael,

      Thanks for the reply.

      It's not quite what I was hoping for. I want to create and format a summary in code but it is difficult to determine what I create and set and in what order.

      A high-level programming guide /overview would be very helpful to start with than I'd feel more comfortable looking ad the API documentation.

      • 0
        Michael Peterson
        Michael Peterson answered on Mar 27, 2020 7:19 PM

        Hello Craig,

        Thank you for the update. If you look at the API link and scroll down there is a code sample. In the code sample it demonstrate enabling summaries, how if you want disabling it for specific columns. Then it shows how to create a Max and Avg summaries, how to set the format for those summaries.

      • 0
        Craig Nicholas
        Craig Nicholas answered on Mar 30, 2020 11:38 AM

        Hi Michael,

        Thanks for your help so far.

        I have got a basic summary working now but I can't get the summary caption to display.

        I set the override value in code but when I pause in debug it is set to Default. If I change it in the immediate windows to true it displays ok. Code below:

                public static void AddSummaryValue(ref Ucl.Main.uclGrid ugdList, string colName, SummaryType summaryType, SummaryDisplayAreas summaryDisplayArea, Infragistics.Win.HAlign hAlign, int summaryBand)
                {
                    SummarySettings sumSummary = ugdList.DisplayLayout.Bands[0].Summaries.Add(colName, summaryType, ugdList.DisplayLayout.Bands[0].Columns[colName]);
                    sumSummary.SummaryDisplayArea = summaryDisplayArea;
                    sumSummary.Appearance.TextHAlign = hAlign;
                    ugdList.DisplayLayout.Bands[summaryBand].Summaries[colName].DisplayFormat = "{0:" + ugdList.DisplayLayout.Bands[0].Columns[colName].Format + "}";
                }
         
                public static void SummaryFooterCaption(ref Ucl.Main.uclGrid ugdList, string caption, int summaryBand) 
                {
                    ugdList.DisplayLayout.Bands[summaryBand].SummaryFooterCaption = caption;
                    ugdList.DisplayLayout.Override.SummaryFooterCaptionVisible = DefaultableBoolean.True;
                    ugdList.DisplayLayout.RefreshSummaries();
                }
        

      • 0
        Craig Nicholas
        Craig Nicholas answered on Mar 30, 2020 2:15 PM

        Update: I've used this code with other grids and the caption is displayed. Puzzled why the override would not be set in this case.

      • 0
        Michael Peterson
        Michael Peterson answered on Mar 30, 2020 6:25 PM

        Hello Craig,

        Thank you for the update. When are you calling those methods? How are you setting up the grid? Do you have a sample you can attach that I can run/debug to see why the caption isn’t being displayed for you?

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Craig Nicholas
Favorites
0
Replies
6
Created On
Mar 30, 2020
Last Post
5 years, 11 months ago

Suggested Discussions

Created by

Created on

Mar 30, 2020 6:25 PM

Last activity on

Feb 12, 2026 9:26 AM