How to Show or Hide Headers in Windows Forms Grid Control
18 Nov 20182 minutes to read
You can show or hide row and column headers using ShowColumnHeaders_and_ShowRowHeaders properties.
Column header
To show column header set ShowColumnHeaders property to true.
The following code illustrates how to show column header in GridControl:
gridControl1.ShowColumnHeaders = true;gridControl1.ShowColumnHeaders = TrueThe following code illustrates how to show column header in GridDataBoundGrid:
gridDataBoundGrid.ShowColumnHeaders = true;gridDataBoundGrid.ShowColumnHeaders = TrueThe following code illustrates how to show column header in GridGrouping control:
gridGroupingControl1.ShowColumnHeaders = true;gridGroupingControl1.ShowColumnHeaders = TrueRow header
To show the row header, set ShowRowHeaders property to true.
The following code illustrates how to show row header in GridControl:
gridControl1.ShowRowHeaders = true;gridControl1.ShowRowHeaders = TrueThe following code illustrates how to show row header in GridDataBoundGrid:
gridDataBoundGrid.ShowRowHeaders = true;gridDataBoundGrid.ShowRowHeaders = TrueThe following code illustrates how to show the row header in GridGrouping control:
gridGroupingControl1.ShowRowHeaders = true;gridGroupingControl1.ShowRowHeaders = True