Hi,
I've got a grid where I'm grouping rows and showing summary values.
I've managed to override the GroupByRowDescriptionMask as follows:
grid.DisplayLayout.Override.GroupByRowDescriptionMask = "[value]";
But no matter what I do, I can't get rid of a whole lot of nonsense from the summary cells.Every cell being summarised has some text added to it which I just don't want to see...It makes the whole thing look very poor!
Any ideas how to get rid of this so that it only shows the value with nothing else??
Cheers,
James
Hi James,
Are you saying you don't want to show the summary information in the GroupByRow at all? Or that you want the summaries to display without any text like "Sum="?
For the former, you just set:
grid.DisplayLayout.Override..SummaryDisplayArea = SummaryDisplayAreas.Bottom;
For the latter, you have to modify the SummarySettings. So it would look something like this:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; UltraGridOverride ov = layout.Override; layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; band.SortedColumns.Add("Int32 1", false, true); ov.GroupByRowDescriptionMask = "[value]"; SummarySettings summarySettings = band.Summaries.Add(SummaryType.Sum, band.Columns["Int32 2"]); summarySettings.DisplayFormat = "{0}"; }
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; UltraGridOverride ov = layout.Override; layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; band.SortedColumns.Add("Int32 1", false, true);
ov.GroupByRowDescriptionMask = "[value]";
SummarySettings summarySettings = band.Summaries.Add(SummaryType.Sum, band.Columns["Int32 2"]); summarySettings.DisplayFormat = "{0}"; }
Hi Mike,
That's perfect...
Did it for me!
Hello James,
I've created a sample based on Mike's suggestions. Could you please review it and let me know if it meets your requirements?