title: Javascript On Text Changed in GridView
body: <p>How can I get textbox value inside my gridview with javascript ?</p>
  
  <p>I want to put a value in a textbox from another textbox in the same column.</p>
  
  <p><code>document.getElementById</code> doesn't work..</p>
  
  <p>Thanks for your help.</p>
  
  <pre><code> &lt;asp:GridView runat="server" ID="maGrid" AutoGenerateColumns="false" ShowFooter="true" ShowHeaderWhenEmpty="true" 
                                        OnRowEditing="maGrid_RowEditing" OnRowCancelingEdit="maGrid_RowCancelingEdit" OnRowUpdating="maGrid_RowUpdating" OnRowDeleting="maGrid_RowDeleting"
                                        DataKeyNames="ProduitId" Width="100%" HeaderStyle-HorizontalAlign="Center"&gt;
         &lt;asp:TemplateField HeaderText="% évolution" ItemStyle-Width="5%"  ItemStyle-HorizontalAlign="Center" &gt;
                                                &lt;ItemTemplate&gt;
                                                    &lt;asp:Label Text='&lt;%# Eval("EvoN1") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                                                &lt;/ItemTemplate&gt;
                                                &lt;EditItemTemplate&gt;
                                                    &lt;asp:TextBox ID="tbEvoN1" Text='&lt;%# Eval("EvoN1") %&gt;' runat="server" CssClass="form-control"/&gt;
                                                &lt;/EditItemTemplate&gt;
                                                 &lt;FooterStyle Width="5%" /&gt; 
                                                &lt;FooterTemplate&gt;                                                   
                                                    &lt;asp:TextBox ID="txtEvoN1" runat="server" CssClass="form-control" OnTextChanged="txtEvoN1_TextChanged" AutoPostBack="True" CausesValidation="true" ValidationGroup="Insert2"/&gt;
                                                  &lt;asp:RequiredFieldValidator ID="RequiredFieldValidatortxtEvoN1" runat="server" ValidationGroup="Insert2" ErrorMessage="Nombre !"
                                                ValidationExpression="^[0-9]+$" ControlToValidate="txtEvoN1"  CssClass="field-validation-error" /&gt;
  
                                                &lt;/FooterTemplate&gt;
                                            &lt;/asp:TemplateField&gt;
  
    &lt;asp:TemplateField HeaderText="N+1" ItemStyle-Width="10%"  ItemStyle-HorizontalAlign="Center" &gt;
                                                &lt;ItemTemplate&gt;
                                                    &lt;asp:Label Text='&lt;%# Eval("N1") %&gt;' runat="server"&gt;&lt;/asp:Label&gt;
                                                &lt;/ItemTemplate&gt;
                                                &lt;EditItemTemplate&gt;
                                                    &lt;asp:TextBox ID="tbN1" Text='&lt;%# Eval("N1") %&gt;' runat="server" CssClass="form-control"/&gt;
                                                &lt;/EditItemTemplate&gt;
                                                &lt;FooterStyle Width="15%" /&gt; 
                                                &lt;FooterTemplate&gt;
                                                    &lt;asp:TextBox ID="txtN1" runat="server" CssClass="form-control" ReadOnly="true" CausesValidation="true" ValidationGroup="Insert3"/&gt;
                                                     &lt;asp:RequiredFieldValidator ID="RequiredFieldValidatortxtN1" runat="server" ControlToValidate="txtN1" ValidationGroup="Insert3"
                                                   ErrorMessage="valeur"&gt;&lt;/asp:RequiredFieldValidator&gt;
                                               &lt;/FooterTemplate&gt;
    &lt;/Columns&gt;
   &lt;/asp:GridView&gt;
  </code></pre>