Hi,
Quick question, it's possible add the OutlookGroupBy Label using to group, on both top and bottom of witch group, just inline or above the Sum box, like on this picture:
My code:
' Agrupar por grupos
UltraGrid1.DisplayLayout.ViewStyleBand = Infragistics.Win.UltraWinGrid.ViewStyleBand.OutlookGroupBy
UltraGrid1.DisplayLayout.GroupByBox.Hidden = True
UltraGrid1.DisplayLayout.Bands(0).SortedColumns.Add("Tarifario", False, True)
UltraGrid1.DisplayLayout.Bands(0).Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom _
Or Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.GroupByRowsFooter
Regards!
Hugo
Hi Hugo,
There's a sample posted by another customer here which shows how to move the SummaryFooter text into the summary row. So you could combine the two and just use the text from the GroupByRow instead of the normal SummaryFooter text.
Mike,
Can you give some help to get the label in only a row ?
Like this:
That would be Great!!
"My" code:
Private Sub IUIElementCreationFilter_AfterCreateChildElements(ByVal parent As Infragistics.Win.UIElement) Implements Infragistics.Win.IUIElementCreationFilter.AfterCreateChildElements If TypeOf parent Is Infragistics.Win.UltraWinGrid.SummaryFooterCaptionUIElement Then ' Get the Text UIElement inside the summary footer caption UIElement. Dim textUIElement As Infragistics.Win.TextUIElement = TryCast(parent.GetDescendant(GetType(Infragistics.Win.TextUIElement)), Infragistics.Win.TextUIElement) If textUIElement IsNot Nothing Then ' Get the associated rows collection. Dim rows As Infragistics.Win.UltraWinGrid.RowsCollection = TryCast(parent.GetContext(GetType(Infragistics.Win.UltraWinGrid.RowsCollection)), Infragistics.Win.UltraWinGrid.RowsCollection) If rows IsNot Nothing Then ' Get the GroupByRow which is the parent of the rows collection. Dim groupByRow As Infragistics.Win.UltraWinGrid.UltraGridGroupByRow = TryCast(rows.ParentRow, Infragistics.Win.UltraWinGrid.UltraGridGroupByRow) If groupByRow IsNot Nothing Then ' Set the text of the Text UIElement inside the SummaryFooterCaption to ' the description text on the GroupByRow textUIElement.Text = groupByRow.Description Else textUIElement.Text = "Totais" End If End If End If End If
End Sub
Thank you so much!
Regars
Okay, here's a quick sample I whipped up that replaces the text in the SummaryFooterUIElement's TextUIElement with the Description property of the GroupByRow.
Mike, feel free to choose. Inline or above the sum's it's good to me.
The witdh of text it's in general the one from the screen shot.
HugoCore said:How about the label that says "Summaries.." or "Totals"..Dont remember well, I erased it. Can i changed it for the groups?
You could do that, but you still need a CreationFilter and then the GroupByRow text would be on a separate line than the summaries. Is that what you want?
From the screen shot you posted here, it looks like the GroupByRow text will not fit into the spot you want it. So putting it on it's own row in the SummaryFooterCaption is probably a good idea.
Just let me know where you want it and I will whip up a sample CreationFilter to help you out.