You must have the DisplayLayout.Override.AllowRowSummaries property this way:
DisplayLayout.Override.AllowRowSummaries = AllowRowSummaries.Default;
then use code like this to create a summary (You need to check before creating another resume with the same name)
private void BuildCurrencySummary(string name, UltraGridColumn col)
{
SummarySettings ss = grd.DisplayLayout.Bands[0].Summaries.Add(name, SummaryType.Sum, col);
ss.SummaryPositionColumn = col;
ss.SummaryPosition = SummaryPosition.UseSummaryPositionColumn;
ss.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True;
ss.Appearance.ForeColor = Color.Black;
ss.Appearance.TextHAlign = HAlign.Right;
ss.DisplayFormat = "{0:C}";
}
Steve source
share