I want to add a special column summary (COL 2 - in attached picture). In column 1, summary is straight forward (sum of individual rows) but in column 2, i have a number and want to show in summary. Please suggest how can we add this in summary ?
Hi Bharat,
There are a few ways you can accomplish this task of adding a summary to display a special value. First you could use the SummaryType of Formula and set the formula equal to the special value you want to show. Another way would be to set the SummaryType to Custom and implement the ICustomSummaryCalculator interface. There is a nice walkthrough in the help for the SummaryType.Custom via http://help.infragistics.com/Help/Doc/WinForms/2014.2/CLR4.0/html/Infragistics4.Win.UltraWinGrid.v14.2~Infragistics.Win.UltraWinGrid.SummarySettings~CustomSummaryCalculator.html and then you would just return the value you want in the EndCustomSummary function. Third you could also implement an ExternalSummaryCalculator and by-pass the built-in capabilities of the summary logic and just spit out the value you want, which is explained in the help via: http://help.infragistics.com/doc/WinForms/2014.2/CLR4.0/?page=WinGrid_Performing_External_Summary_Calculations.html.
Hi Matthew,I am already using ICustomSummaryCalculator for summaries but using this interface can only show the summary based on grid rows.like: Sum of column values and show result on summary (in column 4 - attached screenshot).Right now, I am setting grid column summaries at the time of Form Load then adding values from a dictionary to grid columns.After this
grdData.DisplayLayout.Bands[0].SortedColumns.RefreshSort(true);
And got the updated summaries but I want to show some numbers in summaries similar with column 5 and these numbers are in dictionary.