I have a datagridview
in a windows form which contains some columns. And I want to hide the Ist column(CompanyID) through the code behind.
But Ist column is not hiding.
Have tried below 2 things :
dgvVendorDetails.Columns["CompanyID"].Visible = false;
And:
dgvVendorDetails.Columns[0].Visible = false;
I don't know the reason behind this. I have searched a lot but got no solution.