How to get sorting without removing Row-Created function(Use for changing column of header-text in run-time)
<p>The following code is my Grid View AA from aspx page.</p>

<pre><code>&lt;asp:GridView ID="GridView_AA" runat="server" OnSorting = "Gridview_AA_Sorting" OnRowCreated="GridView_AA_RowCreated"&gt;
&lt;asp:TemplateField HeaderText="Period Name" SortExpression="PERIOD_NAME"&gt;
 &lt;EditItemTemplate&gt;
  &lt;asp:TextBox ID="txtGVPeriodName" runat="server" Text='&lt;%# Bind("PERIOD_NAME") %&gt;'&gt;&lt;/asp:TextBox&gt;
 &lt;/EditItemTemplate&gt;
 &lt;ItemTemplate&gt;
  &lt;asp:Label ID="lblGVPeriodName" runat="server" Text='&lt;%# Bind("PERIOD_NAME") %&gt;' Visible="False"&gt;&lt;/asp:Label&gt;
  &lt;asp:LinkButton ID="lborganize" runat="server" OnClick="lborganize_Click" Text='&lt;%# Bind("PERIOD_NAME") %&gt;'&gt;&lt;/asp:LinkButton&gt;
 &lt;/ItemTemplate&gt;
 &lt;HeaderStyle HorizontalAlign="Center" Width="400px" /&gt;
 &lt;ItemStyle HorizontalAlign="Center" Width="400px" /&gt;
&lt;/asp:TemplateField&gt;
&lt;/asp:GridView&gt;
</code></pre>

<p>I cannot sort after adding GridView_AA_RowCreated function. Each column of Grid view header-text worked well before I add this Row Created function. If I cut the following code: e.Row.Cells[2].Text = "Period Name";
Sorting works. I want to get sorting without removing this Row Created function. Do you have any brighter solution about my problem?</p>

<pre><code> protected void GridView_AA_RowCreated(object sender, GridViewRowEventArgs e)
    {
          if (e.Row.RowType == DataControlRowType.Header)
           {
                    e.Row.Cells[2].Text = "Period Name"; //Change header text in run-time
            }
    }
</code></pre>
