c# hide a column in datagridview code example
Example 1: c# datagridview hide column
this.dataGridView1.Columns["ID"].Visible = false;
Example 2: c# datagridview hide header
dataGridView1.ColumnHeadersVisible = false;
this.dataGridView1.Columns["ID"].Visible = false;
dataGridView1.ColumnHeadersVisible = false;