Hello,
I have a grid in OutlookGroupBy mode as depicted in the attached screenshot. I would like to change the text (and maybe appearance as well) of the grand summary, can you tell me how to proceed?
Thank you.
Hi,
I don't see a Grand Total summary in this screen shot.
There are summaries at the bottom of the island and there are summaries in the GroupByRow.
To which summary are you referring?
For the summary cells at the bottom, you would probably want to use the SummarySetting.Appearance.You can get the SummarySettings from the Summaries collection on the band.
For the summaries in the GroupByRow, the way you have it set up here, the summaries are just displayed as part of the summary description. They are just text, so there's no way to apply an appearance to them specifically. You could change the GroupByRowSummaryDisplayStyle so that the summaries in the GroupByRow are cells that align with the columns and then apply appearances to them, if that's what you want.
Mike,
If you click on the image and open it up in a new window, you will see the two summaries that I am referring to.
Daniel
Hi Daniel,
I did that already. I see two summaries at the bottom of the column, which I mentioned in my previous reply. Those are just summaries, there's nothing grand about them. Grand to me means like a grand total. But those appear to just be the total of the rows collection.
Anyway, I told you how to set the appearances on those above.
This is the first time I am using summaries in UltraWinGrid. Please take a look at the new screenshot that shows the full grid. The grid has one single band with one summary on the column Estimated Cost. The following code sets up the grouping:
dgItems.DisplayLayout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom Or Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.InGroupByRows Or Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.GroupByRowsFooter dgItems.DisplayLayout.Bands(0).SortedColumns.Add("Iteration", False, True)
The cell at the very bottom that shows 'Total: $640' is to me a grand total and I would like to change the text/appearance correspondingly. I tried to modify various summary settings with no success.
Is there a way to do this?
Sorry for any confusion.
Oh, okay, I see what you mean now. So you want to color the grand total differently then the other summaries?
Okay, there's no appearance specifically for that. But you can take advantage of the fact that you are grouping the rows to distinguish the gran total.
Something like this:
Private Sub UltraGrid1_SummaryValueChanged(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.SummaryValueChangedEventArgs) Handles UltraGrid1.SummaryValueChanged If (e.SummaryValue.ParentRows.IsGroupByRows) Then e.SummaryValue.Appearance.BackColor = Color.Red End If End Sub
Thaks Mike, this worked. However, is there a way to change the text to 'Grand Total'? The SummaryText property is read-only.
You can change the text for the summary using the DisplayFormat property on the SummarySettings. But this will change it for the summary everywhere. There's no property to change it just for the grand total.
The only way to do that would be to use a DrawFilter to draw the text yourself or a CreationFilter to change the text of the UIElement.