title: How to hide column in data table
body: <p>I have <code>DataTable</code> which I filled using an SQL Query. Then I filled the <code>GridView</code> with the <code>DataTable</code>.</p>
  
  <pre><code>DataTable table = new DataTable();
  table.Load(reader);
  gvAktivne.DataSource = table;
  gvAktivne.DataBind();
  </code></pre>
  
  <p>This works fine but now I want to hide the first column. When I add this:</p>
  
  <pre><code>gvAktivne.Columns[0].Visible = false;
  </code></pre>
  
  <p>I get an <code>IndexOutOfRange</code> exception.
  Does anybody have an idea how to fix this?</p>