title: Can't Get Gridview Row data from RowIndex
body: <p>Hi I am stuck in one problem and I hope you guys will help me to get this thing done.</p>
  
  <p>I have a web application with update panel implemented in it. I have a Grid View which is placed inside the update panel. In Grid View there is a template filed of Text Box with Auto PostBack="true". On Text Changed event i want to get that row data on server side.</p>
  
  <p>Grid View is Bind with data on Page Load event and after every one minute when timer ticks.</p>
  
  <p>The problem I am facing is that on server side I get the row data as null. The code may help you guys.</p>
  
  <p>Aspx page</p>
  
  <pre><code> &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"&gt;
        &lt;ContentTemplate&gt;
          &lt;div class="c-table"&gt;
            &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" AllowPaging="True" PageSize="100" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowCommand="GridView1_RowCommand"&gt;
                    &lt;Columns&gt;
  
                    &lt;asp:TemplateField HeaderText="Id"&gt;
                     &lt;ItemTemplate&gt;
                      &lt;p&gt; &lt;%# Eval("Id") %&gt;&lt;/p&gt;
                     &lt;/ItemTemplate&gt;
                     &lt;asp:TemplateField&gt;
  
                     &lt;asp:TemplateField HeaderText="Title"&gt;
                     &lt;ItemTemplate&gt;
                      &lt;p&gt; &lt;%# Eval("Title") %&gt;&lt;/p&gt;
                     &lt;/ItemTemplate&gt;
                     &lt;/asp:TemplateField&gt;
  
                  &lt;asp:TemplateField HeaderText="Bid"&gt;
                  &lt;ItemTemplate&gt;
                  &lt;asp:TextBox ID="TextBox2" runat="server" OnTextChanged="TextBox2_TextChanged" AutoPostBack="true"&gt;&lt;/asp:TextBox&gt;
                  &lt;/ItemTemplate&gt;
                 &lt;/asp:TemplateField&gt;
  
                 &lt;asp:TemplateField HeaderText="Link"&gt;
                 &lt;EditItemTemplate&gt;
                 &lt;asp:Label ID="Label1" runat="server" Text='&lt;%# Eval("id") %&gt;'&gt;&lt;/asp:Label&gt;
                 &lt;/EditItemTemplate&gt;
                 &lt;ItemTemplate&gt;
                 &lt;asp:LinkButton ID="LinkButton3" runat="server"  CommandName="visit" CommandArgument='&lt;%# Bind("id") %&gt;'&gt;Visit&lt;/asp:LinkButton&gt;  
                 &lt;/ItemTemplate&gt;
                 &lt;/asp:TemplateField&gt;
  
  
                 &lt;/Columns&gt;
  
                 &lt;/asp:GridView&gt;
  
  
  
                &lt;/ContentTemplate&gt;
               &lt;/asp:UpdatePanel&gt;
  </code></pre>
  
  <p>.cs code</p>
  
  <pre><code>    protected void TextBox2_TextChanged(object sender, EventArgs e)
      {
  
  
          GridViewRow gridRow = ((GridViewRow)((TextBox)sender).NamingContainer);
          int index = gridRow.RowIndex;
          string check = GridView1.Rows[index].Cells[0].Text;
  
  
  
      }
  </code></pre>
  
  <p>In Check i get the value NULL I don't know why? Looking forward for help. Thanks</p>