title: GridView.Columns[index].HeaderText Throws "Index was out of range" Error
body: <pre><code>    gvOff.DataSource = o.ViewData(dCity.SelectedValue);
      gvOff.DataBind();
      gvOff.Columns[0].HeaderText = "ZZZZZZZZ";
      gvOff.Columns[1].HeaderText = "YYYYYYYY";
      gvOff.Columns[2].HeaderText = "XXXXXXXX";
  </code></pre>
  
  <p><strong>Header count is correct.</strong></p>
  
  <p><strong>AutoGenerateColumns: Flase/True ( i tried both)</strong></p>
  
  <p><strong>If i remove the gvOff.Columns[index].HeaderText portions, GridView works fine, but when i put the gvOff.Columns[0].HeaderText, i get the exceptional error.</strong></p>
  
  <p>Can you please help, i couldn't solve it. If you need further info, inform me.</p>
  
  <hr>
  
  <p>EDITED:</p>
  
  <p>Hold on! I commented the HeaderText portion and tested</p>
  
  <p>int i = gvOffer.Columns.Count; </p>
  
  <p>I found count is 0 eventhough the columns print out with DataBind()... Why?</p>
  
  <p>NOTE: AutoColumn in this case is set to true. I guess i will have to edit the column
  names from DataTable.</p>