Skip to content

Replies

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
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 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.