Programatically created events in RowDataBound not firing
<p>I have a GridView which is populated from a database, and includes a textbox. Through the code behind, I want to subscribe the textbox on each row to a certain event, but only if a field of the row matches some if statement.</p>

<p>So I have the following:</p>

<pre><code>protected void grdRates_RowDataBound(object sender, GridViewRowEventArgs e)
{
    TextBox txt = (TextBox)e.Row.FindControl("txtValue");
    DataRowView dataView = (DataRowView)e.Row.DataItem;
    if ((bool)dataView["isAuto"])
    {
        txt.AutoPostBack = true;
        txt.TextChanged += new EventHandler(txt_TextChanged);
    }
} 

protected void txt_TextChanged(object sender, EventArgs e)
{
    //Other stuff here
}
</code></pre>

<p>The problem is, the text changed event never fires - the AutoPostBack property is being set, as the page posts back when they move out of the TextBox, but the text changed event does not fire. Am I missing something here?</p>
