How to hide the columnheader in DataGridView in VB.NET

If you would like to hide the columnheaders of a datagridview in your winforms application then here is the code for that.


‘ This will hide all the column headers for your datagridview


In VB.NET use this code

 DataGridView1.ColumnHeadersVisible = False



In C# use the following code


dataGridView1.ColumnHeadersVisible = false;