title: How to get the textbox control inside gridview using jquery
body: <p>I tried the following code</p>
  
  <p></p>
  
  <pre><code>    $(document).ready(function () {
  
          alert("test");
          var $arrT = $('#&lt;%=gvView.ClientID %&gt;').find('input:text[id$="txtRow"]');
          alert($arrT.length);
  
          var $txt = $arrT[0];
          alert($txt);
  
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>The Length is always 0 and $txt is undefined. I am new to jquery. Please help. What am I doing wrong. Here is my gridview 
       </p>
  
  <pre><code>       &lt;Columns&gt;
             &lt;asp:TemplateField HeaderText="LineNo"&gt;
            &lt;ItemTemplate&gt;   
             &lt;asp:Label ID="lblLineno" runat="server"&gt;&lt;/asp:Label&gt;
           &lt;/ItemTemplate&gt; 
   &lt;/asp:TemplateField&gt;
    &lt;asp:TemplateField HeaderText="IsEmployee"&gt;
       &lt;ItemTemplate&gt;
         &lt;asp:CheckBox ID="chckIsEmp" runat="server" /&gt; &lt;/ItemTemplate&gt;  &lt;/asp:TemplateField&gt;
       &lt;asp:TemplateField HeaderText="EmpNo"&gt;  
      &lt;ItemTemplate&gt;
         &lt;asp:TextBox ID="txtcostcenter" runat="server" &gt;&lt;/asp:TextBox&gt;
          &lt;/ItemTemplate&gt;
   &lt;/asp:TemplateField&gt; 
  &lt;/Columns&gt; 
    &lt;/asp:GridView&gt;
  </code></pre>