Click here to Skip to main content
15,905,782 members
Please Sign up or sign in to vote.
5.00/5 (2 votes)
See more:
Hello, I am lakshmana rao.
my web page having an gridview just as below
C#
<pre lang="c#"> <asp:GridView ID="GridView2" runat="server" ShowFooter="True" CssClass="grid"
                AutoGenerateColumns="False" 
                 onrowcreated="GridView2_RowCreated" CellPadding="4" ForeColor="#333333" 
                 GridLines="None" Width="100%">
                  <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField HeaderText="S.NO" DataField="s.NO" />                     
                <asp:TemplateField HeaderText="Task">
               <ItemTemplate>
                   <asp:TextBox ID="TextBox2" runat="server" OnTextChanged=TextBox2_textchanged" CssClass="gridtextbox">
</asp:TextBox>
</Columns>   
 </asp:GridView>

and i want to write event of "text_changed".
and write code behind code as follows...
<pre lang="c#">
protected void TextBox4_leave(object sender, EventArgs e)
{

}

but this event is not fired when the text changed.
so please find me the solution...
Posted

The method in the code behind that you are referencing is TextBox4_leave. You want to write the code in the TextBox2_textchanged method.
 
Share this answer
 
XML
<asp:TextBox ID="TextBox2" runat="server" OnTextChanged=TextBox2_textchanged" CssClass="gridtextbox">
</asp:TextBox>


set AutoPostBack="true"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900