title: How to hide gridview column after databind?
body: <p>I hide my columns using the solution in following link</p>
  
  <p><a href="https://stackoverflow.com/questions/4954871/how-to-hide-a-templatefield-column-in-a-gridview">How to hide a TemplateField column in a GridView</a></p>
  
  <p>However this causes problems with update operations, as gridview acts as hidden rows has null value. So how to hide columns after databind?</p>
  
  <pre><code>protected void begv_OrderDetail_RowCreated(object sender, GridViewRowEventArgs e)
  {
      ((DataControlField)begv_OrderDetail.Columns.Cast&lt;DataControlField&gt;().Where(fld =&gt; fld.HeaderText == "FileNo").SingleOrDefault()).Visible = "False";
  }
  </code></pre>