DataBind GridView OnKeyUp/Down
<p>I have a gridview that will display customer information.  I want it to update the results as the user types first and/or last name into the textboxes.  Basically, to databind the gridview to it's datasource with the updated characters from the textboxes as the user types.</p>

<p>CODE EDITED:</p>

<pre><code>&lt;%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Process.aspx.cs" Inherits="Reservations.WebForm3" %&gt;

&lt;asp:UpdateProgress ID="UpdateProgress1" runat="server" 
        AssociatedUpdatePanelID="UpdatePanel1"&gt;
        &lt;ProgressTemplate&gt;Processing...&lt;/ProgressTemplate&gt;
&lt;/asp:UpdateProgress&gt;
&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
   &lt;ContentTemplate&gt;
      &lt;asp:TextBox ID="firstname" runat ="server" class="inputLarge" ontextchanged="firstname_TextChanged" /&gt;
      &lt;asp:TextBox ID="lastname" runat="server" class="inputLarge" /&gt;

&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="457px"&gt;
                &lt;Columns&gt;
                    &lt;asp:TemplateField&gt;
                        &lt;EditItemTemplate&gt;
                            &lt;asp:CheckBox ID="CheckBox1" runat="server" /&gt;
                        &lt;/EditItemTemplate&gt;
                        &lt;ItemTemplate&gt;
                            &lt;asp:CheckBox ID="CheckBox1" runat="server" /&gt;
                        &lt;/ItemTemplate&gt;
                        &lt;ItemStyle HorizontalAlign="Center" /&gt;
                    &lt;/asp:TemplateField&gt;
                    &lt;asp:BoundField DataField="CustID" HeaderText="Cust ID"&gt;
                    &lt;ItemStyle HorizontalAlign="Center" /&gt;
                    &lt;/asp:BoundField&gt;
                    &lt;asp:BoundField DataField="FirstName" HeaderText="First Name"&gt;
                    &lt;ItemStyle HorizontalAlign="Center" /&gt;
                    &lt;/asp:BoundField&gt;
                    &lt;asp:BoundField DataField="LastName" HeaderText="Last Name"&gt;
                    &lt;ItemStyle HorizontalAlign="Center" /&gt;
                    &lt;/asp:BoundField&gt;
                    &lt;asp:BoundField DataField="City" HeaderText="City"&gt;
                    &lt;ItemStyle HorizontalAlign="Center" /&gt;
                    &lt;/asp:BoundField&gt;
                &lt;/Columns&gt;
            &lt;/asp:GridView&gt;
            &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
            &lt;Scripts&gt;&lt;/Scripts&gt;
            &lt;/asp:ScriptManager&gt;
        &lt;/ContentTemplate&gt;
        &lt;Triggers&gt;
            &lt;asp:AsyncPostBackTrigger ControlID="firstname" EventName="TextChanged" /&gt;
        &lt;/Triggers&gt;
    &lt;/asp:UpdatePanel&gt;


protected void firstname_TextChanged(object sender, EventArgs e)
    {
        InventoryAppSoapClient inst = new InventoryAppSoapClient();
        DataSet ds = inst.getCustomer(firstname.Text, "none");
        GridView1.DataSource = ds;
        GridView1.DataBind();           
    }
</code></pre>

<p>Everything works except the TextChanged event only first the first time.  If I go back and change the text and tab off, nothing happens.</p>
