Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sometimes you will want to display a DataGridView without column headers. In the DataGridView control, the ColumnHeadersVisible property value determines whether the column headers are displayed.
To hide the column headers
Set the DataGridView.ColumnHeadersVisible property to
false
.dataGridView1.ColumnHeadersVisible = false;
dataGridView1.ColumnHeadersVisible = False
Compiling the Code
This example requires:
A DataGridView control named
dataGridView1
.References to the System and System.Windows.Forms assemblies.
See also
.NET Desktop feedback