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.
Hi Mike, sorry to bother you again, I didn´t realize about this behavior in my group by rows when I change the title by a custom text(using InitializeGroupByRow event), default summary caption is displayed with along the custom text. I only want to show my custom text in the group by rows.How can I do this?
In the image that Im attaching, I try to describe what i want. I hope explaining myself well.
This is the code that Im using:
Private Sub UltraGrid1_InitializeLayout(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout
Dim columnToSummarize As UltraGridColumn = e.Layout.Bands(0).Columns("mts") Dim summary As SummarySettings = e.Layout.Bands(0).Summaries.Add("Total", SummaryType.Sum, columnToSummarize) summary.Appearance.TextHAlign = Infragistics.Win.HAlign.Right e.Layout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.InGroupByRows End SubPrivate Sub UltraGrid1_InitializeGroupByRow(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeGroupByRowEventArgs) Handles UltraGrid1.InitializeGroupByRow Dim s As String = e.Row.DescriptionWithSummaries Dim posicion As Integer = InStr(s, "=") Dim total As String = Mid(s, posicion + 1, s.Length) If e.Row.Column.Key = "zone" Then e.Row.Appearance.BackColor = Color.Purple e.Row.Description = "" e.Row.Description = "Zone : " & e.Row.Value.ToString() & ", Total of zonas : " & e.Row.Rows.Count & " Total of meters: " & suma.ToString End If If e.Row.Column.Key = "Subzone" Then e.Row.Appearance.BackColor = Color.Tomato e.Row.Description = "" e.Row.Description = "Subzone : " & e.Row.Value.ToString() & ", Total of Subzones : " & e.Row.Rows.Count & " Total of meters: " & suma.ToString End If End Sub
Hi,
I can't see why that would be happening. Your sample code here is incomplete, though, so it's hard to tell. What is "suma", for example? Maybe the text of that item is returning something you are not expecting.