how to hide datagridview in c# code example
Example 1: c# datagridview hide column
this.dataGridView1.Columns["ID"].Visible = false;
Example 2: c# datagridview hide row selector
//Set the RowHeadersVisible to False in the GridView (it's a property)
//Or By Code:
DatagridView.RowHeadersVisible = false;