Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
500
OutlookGroupBy Label Top and Bottom
posted

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

Parents Reply Children
  • 469350
    Offline posted in reply to 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.

     

  • 500
    posted in reply to Mike Saltzman

    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

    Hugo