I'm implementing grouping in a RadGridView. The grouping is working fine. I was then asked to allow the user to switch between grouping and not grouping, so I added a couple of radio buttons then I call a subroutine (VB.NET) that performs the following logic when the user clicks on either of the radio buttons:
Initially, when the form first loads, the default checked radio button is the Group By None radio button (rbGroupByNone). I click on the Group By Ship To radio button (rbGroupByShipTo) and grouping occurs. I click on the Group By None radio button and grouping goes away. But then, when I click on the Group By Ship To radio button once more, it no longer groups.
I then tried repopulating the gridview with the following code, but that did not work:
Thanks in advance for any suggestions,
Hector
Private Sub Process_GroupByShipTo_CheckedChanged() If Not bControlsPopulated Then Exit Sub End If If rbGroupByShipTo.Checked Then rgvItems.EnableGrouping = True rgvItems.ShowGroupedColumns = True Else rgvItems.EnableGrouping = False rgvItems.ShowGroupedColumns = False End If End Sub Initially, when the form first loads, the default checked radio button is the Group By None radio button (rbGroupByNone). I click on the Group By Ship To radio button (rbGroupByShipTo) and grouping occurs. I click on the Group By None radio button and grouping goes away. But then, when I click on the Group By Ship To radio button once more, it no longer groups.
I then tried repopulating the gridview with the following code, but that did not work:
Private Sub Process_GroupByShipTo_CheckedChanged() If Not bControlsPopulated Then Exit Sub End If If rbGroupByShipTo.Checked Then rgvItems.EnableGrouping = True rgvItems.ShowGroupedColumns = True rgvItems.DataSource = Nothing rgvItems.Rows.Clear() PopulateDataGrid() Else rgvItems.EnableGrouping = False rgvItems.ShowGroupedColumns = False End If End Sub Thanks in advance for any suggestions,
Hector
