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
850
Sumaries in groupbyrows
posted

Hello,

I want to use GroupByRows in my ultrawingrid. The structure of the table that Im using is diplayed in the image that I attached.

So, I need that my group by rows show me the total of meters for each zone and for each subzone too, exaxcly as shown  in the picture.

what can I do?

Any suggestions, I'll be very grateful

Help me please.

 

 

Parents
No Data
Reply
  • 850
    posted

    Hi Mike, I  change my code

    With DisplayFormat = "Total of meters = {0}"  I don't need all this anymore

            'Dim s As String = e.Row.DescriptionWithSummaries
            'Dim posicion As Integer = InStr(s, "=")
            'Dim total As String = Mid(s, posicion + 1, s.Length)

     

     

    So I changed my InitializeGroupByRow code and add in InitializeLayout

            summary.DisplayFormat = "Total of meters = {0}"

     

    Private Sub UltraGrid1_InitializeGroupByRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeGroupByRowEventArgs) Handles UltraGrid1.InitializeGroupByRow
            If e.Row.Column.Key = "zone" Then
                e.Row.Appearance.BackColor = Color.Purple
                e.Row.Description = "Zone : " & e.Row.Value.ToString() & ", Total of Subzones : " & e.Row.Rows.Count
            End If
            If e.Row.Column.Key = "Subzone" Then
                e.Row.Appearance.BackColor = Color.Tomato
                e.Row.Description = "Subzone : " & e.Row.Value.ToString() & ", Total of rows : " & e.Row.Rows.Count
            End If

        End Sub

     

    and the only problem now is that in my groupbyrows appears the name of the source column To Summarize.

     

    How can I remove it?

     

Children