title: DataGridView ID Column Will Not Hide
body: <p>I have a DataGridView bound to an ObjectDataSource some of the columns are hidden including the ID column. The problem is that the ID column shows up even when its visible property is set to false. Has anyone run into this problem before? Setting the width to zero is not an option since the grid doesn't allow columns with a width less than 5 pixels wide so it still shows the column on the grid no matter what.</p>
  
  <p>The strange thing is that the ID column wasn't always showing. After I worked on the app for a bit the columns appeared again.</p>
  
  <p>DataGridView is not set to auto generate columns. I am building to version 4.0 of .NET and C#.</p>
  
  <p>Here is the code in the form constructor.</p>
  
  <pre><code>dgvActiveMiners.AutoGenerateColumns = false;
  dgvAvilableMiners.AutoGenerateColumns = false;
  dgvOperationResults.AutoGenerateColumns = false;
  
  dgvActiveMiners.Columns["dgvActiveMinersRecordId"].Visible = false;
  dgvAvilableMiners.Columns["dgvAvilableMinersRecordId"].Visible = false;
  dgvOperationResults.Columns["dgvOperationResultRecordId"].Visible = false;
  </code></pre>
  
  <p>This is the generated code for the grids.</p>
  
  <pre><code>this.dgvOperationResults.AllowUserToAddRows = false;
  this.dgvOperationResults.AllowUserToDeleteRows = false;
  this.dgvOperationResults.AutoGenerateColumns = false;
  this.dgvOperationResults.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
  this.dgvOperationResults.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
  this.dgvOperationResultRecordId,
  this.nameDataGridViewTextBoxColumn2,
  this.typeIdDataGridViewTextBoxColumn,
  this.amountDataGridViewTextBoxColumn,
  this.operationIdDataGridViewTextBoxColumn});
  this.dgvOperationResults.DataSource = this.operationResultBindingSource;
  this.dgvOperationResults.Location = new System.Drawing.Point(12, 40);
  this.dgvOperationResults.MultiSelect = false;
  this.dgvOperationResults.Name = "dgvOperationResults";
  this.dgvOperationResults.ReadOnly = true;
  this.dgvOperationResults.Size = new System.Drawing.Size(498, 247);
  this.dgvOperationResults.TabIndex = 16;
  </code></pre>
  
  <p>I don't know what else I could be missing?</p>
  
  <p>Thanks!</p>