How to: Hide Column Headers in the Windows Forms DataGridView Control
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
Sadarbojieties ar mums vietnē GitHub
Šī satura avotu var atrast vietnē GitHub, kur varat arī izveidot un pārskatīt problēmas un atgādāšanas pieprasījumus. Lai iegūtu papildinformāciju, skatiet mūsu līdzstrādnieku rokasgrāmatu.
.NET Desktop feedback
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par