title: C# How to Access Hidden DataTable Columns That is DataSource Binded in DataGridView
body: <p>I having a hard time trying to access hidden columns that been hidden in DataTable which later bind and accessed in DataGridView </p>
  
  <p>In Details : dtResult is a DataTable
  Example Tried : </p>
  
  <pre><code>dtResult.Columns[i].ColumnMapping = MappingType.Hidden;
  </code></pre>
  
  <p>OR</p>
  
  <pre><code>dtResult.Columns.RemoveAt(i);
  </code></pre>
  
  <p>Then Store into DataSource of DataGridView : </p>
  
  <pre><code>dataGridView.DataSource = dtResult;
  </code></pre>
  
  <p>Accessing Hidden Columns occur error :  "Columns 'Active' Cannot be found" : </p>
  
  <pre><code>dataGridView.SelectedRows[0].Cells["active"].Value.ToString()
  </code></pre>
  
  <p>So Is there are way for <strong>DataGridView</strong> to <strong>get Hidden Columns</strong> that been <strong>hidden</strong> in <strong>DataTable before binding it into DataGridView</strong> ? </p>
  
  <p>Please help me~ . Thank you</p>
  
  <p>FYI : </p>
  
  <pre><code>I just realized
  That DataSource Binding doesn't include Hidden Columns of DataTable.
  Means That If DataTable.Column.Count = 10. (2 Hidden)
  DataGridView.DataSource = DataTable.
  DataGridView.Column.Count == 8. 
  </code></pre>
  
  <p>So lead me to ask. 
  How to Bind Those Hidden Column into the DataGridView From DataTable</p>