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
230
Creating a simple Totals row (Summary Columns)
posted

I want a simple totals row at the bottom of the grid. No "Sum =" in the cell, just the total of all the cells in that column. Hopefully the whole row would be in bold font.

I've got the summaries displaying the correct values, in the correct places, except there are two summary rows, one that contains the SummaryFooterCaption, and one that contains the summary values. Can I get the values on the same row as the caption?

If I could just get rid of the "Sum =", and move the values up a row, I'd be a happy camper (for now :).

Later

Art

Parents
  • 20872
    Suggested Answer
    Offline posted

    Hello Art,

    I think that I achieved something similar to what you are looking for. I have used the InitializeLayout event of the UltraGrid and set the following properties there:

     private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
    {
                     // Allowing Summaries in the UltraGrid 
                     e.Layout.Override.AllowRowSummaries = AllowRowSummaries.True;
                     // Setting the Sum Summary for the desired column
                     e.Layout.Bands[0].Summaries.Add("sumarryKey",SummaryType.Sum,e.Layout.Bands[0].Columns["Int"]); 
                   //Set the display format to be just the number 
                    e.Layout.Bands[0].Summaries["sumarryKey"].DisplayFormat = "{0}";
                   //Hide the SummaryFooterCaption row 
                    e.Layout.Bands[0].Override.SummaryFooterCaptionVisible = Infragistics.Win.DefaultableBoolean.False;
    }

    Please let me know if this approach help in your scenario.

     

Reply Children
No Data