title: Change the name of column in Gridview on runtime when sorting of gridview is enabled
body: <p>I want to change the name of one of the column of gridview on runtime.The Gridview has also sorting enabled in it.</p>
  
  <p>the gridview looks like:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true" OnRowCreated="myGrid_Rowcreate" 
  ShowFooter="false"
  AllowSorting="true"
  OnSorting="GridView1_Sorting"
  EnableViewState="false"
  ShowHeaderWhenEmpty="True"
  AllowPaging="false"&gt;
  
  &lt;AlternatingRowStyle CssClass="altrowstyle" /&gt;
  &lt;HeaderStyle CssClass="headerstyle" /&gt;
  &lt;RowStyle CssClass="rowstyle" /&gt;
  &lt;RowStyle Wrap="false" /&gt;
  &lt;HeaderStyle Wrap="false" /&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>and my onRowCreate function looks like:</p>
  
  <pre><code>  protected void myGrid_RowDataBound(object sender, GridViewRowEventArgs e)
      {
          GridViewRow gvr = e.Row;
          if (gvr.RowType == DataControlRowType.Header)
          {
              gvr.Cells[1].Text = "test1";
          }
      }
  </code></pre>
  
  <p>the column name does change to test1 but the sorting feature goes off.what should I do that will change the coulmn name as well as the sorting feature also stays?there is no problem in my sorting.Only when I write the above code,the sorting option for that column goes off.
  Please help!
  thank you.</p>