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, 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?
Hi,
I'm afraid you've completely lost me. I'm not sure what changes you made or what you changed from at this point, so it's impossible for me to guess where that extra text is coming from. I don't see anything in your code that accounts for why you are getting the column name there.
If you can post a small sample project demonstrating this, I would be happy to take a look at it, but the code you posted here is too jumbled for me to get a handle on what I am supposed to do to set it up.