title: hiding a column in a dynamic infragistics grid and updating header
body: <p>I have a infragistics grid that gets data when a dropdown is changed 
  1- i want to hide the last column every time  the grid is loaded with data
  2- i also want to update header according to data</p>
  
  <p>problem 
  I am trying </p>
  
  <pre><code>     protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
      {
          EntityName.Text = DropDownList1.SelectedItem.Text;
          string entity = "t_" + DropDownList1.SelectedItem.Text;
          String strConnString = ConfigurationManager.ConnectionStrings["LiveLeaseConnectionString"].ConnectionString;
          SqlConnection con = new SqlConnection(strConnString);
          SqlCommand cmd = new SqlCommand("p_DataList_ByRegardingObject", con);
          cmd.CommandType = CommandType.StoredProcedure;
          cmd.Parameters.AddWithValue("@RegardingObjectName", entity);
          SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(cmd);
          DataTable dt = new DataTable();
          sqlDataAdapter.Fill(dt);
          this.EntityGrid.DataSource = dt;
          this.EntityGrid.Columns[6].Hidden = true;
  </code></pre>
  
  <p>its throwing null reference error and it doesnt seem to update column names each time it loads data.data is getting refreshed but not the column names.
  here is my aspx</p>
  
  <pre><code>    &lt;asp:DropDownList ID="DropDownList1" AutoPostBack="true" runat="server" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"&gt;
     &lt;asp:ListItem&gt;Select Entity&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  &lt;asp:Label runat="server" ID="EntityName"&gt;&lt;/asp:Label&gt;
  &lt;ig:WebScriptManager ID="WebScriptManager1" runat="server"&gt;&lt;/ig:WebScriptManager&gt;
  &lt;ig:WebDataGrid ID="EntityGrid" runat="server"  Width="100%" Height="50%" StyleSetName="Claymation" &gt;
  
      &lt;Behaviors&gt;
          &lt;ig:Sorting&gt;
          &lt;/ig:Sorting&gt;
  
      &lt;/Behaviors&gt;
      &lt;ClientEvents Click="NavigateOnClick" /&gt;
  &lt;/ig:WebDataGrid&gt;   
  </code></pre>