How to remove the grouped headers in WinForms GridGrouping?
Grouped header
After Grouping, when any change is made in the columns, that is, when expressions are added or columns are removed, then the modifications are not reflected in the GroupDropArea. You need to reset the Grouped Header collection so that the modification done in the columns can also be reflected in the GroupDropArea
Solution:
You can use the GroupedColumns.Reset() method when the changes are done in the columns, to repopulate the Grouped Columns. In the following example, a column Id is grouped and then it is removed from the grid.
C#
//Resets the Grouped Columns. this.gridGrouping.TableDescriptor.GroupedColumns.Reset();
VB
‘Resets the Grouped Columns. Me.gridGrouping.TableDescriptor.GroupedColumns.Reset()
Samples:
Conclusion
I hope you enjoyed learning how to remove the grouped headers in WinForms GridGrouping.
You can refer to WinForms GridGrouping feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our WinForms GridGrouping example to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!