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 Daniel,
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.
Thaks Mike, this worked. However, is there a way to change the text to 'Grand Total'? The SummaryText property is read-only.
Daniel
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
Mike,
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.
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.