Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinGrid
Private Sub Button75_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button75.Click
' Following code groups the rows by two columns.
' Ensure view style is set OutlookGroupBy.
Me.UltraGrid1.DisplayLayout.ViewStyleBand = ViewStyleBand.OutlookGroupBy
' Group rows in band 0 by two columns.
Dim band As UltraGridBand = Me.UltraGrid1.DisplayLayout.Bands(0)
band.SortedColumns.Add(band.Columns(0), False, True)
band.SortedColumns.Add(band.Columns(1), False, True)
End Sub
Private Sub Button76_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button76.Click
' Call ClearGroupByColumns to ungroup all the rows in the UltraGrid if they
' were grouped by any columns.
Me.UltraGrid1.DisplayLayout.ClearGroupByColumns()
' Or you can clear group-by rows on a specific band.
Me.ultraGrid1.DisplayLayout.Bands(0).ClearGroupByColumns()
End Sub