Show or Hide Header in Windows Forms GridControl

15 Jun 20211 minute 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 = True

The following code illustrates how to show column header in GridDataBoundGrid:

gridDataBoundGrid.ShowColumnHeaders = true;
gridDataBoundGrid.ShowColumnHeaders = True

The following code illustrates how to show column header in GridGrouping control:

gridGroupingControl1.ShowColumnHeaders = true;
gridGroupingControl1.ShowColumnHeaders = True

Row 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 = True

The following code illustrates how to show row header in GridDataBoundGrid:

gridDataBoundGrid.ShowRowHeaders = true;
gridDataBoundGrid.ShowRowHeaders = True

The following code illustrates how to show the row header in GridGrouping control:

gridGroupingControl1.ShowRowHeaders = true;
gridGroupingControl1.ShowRowHeaders = True