title: Problem in a gridview when enable textbox
body: <p>I'm having a problem to detect the enabled state of a TextBox when I change the DataSource after a filter string like in my image -> (<a href="https://imgur.com/a/JxTQ8ks" rel="nofollow noreferrer">https://imgur.com/a/JxTQ8ks</a>)</p>
  
  <p>Without filter I can enable the textbox add a value and I got success adding stock (this tb is used for add stock)
  Below, I have my code that fails here ( <strong>if (tb.Enabled)</strong>) even when textbox is enabled</p>
  
  <pre><code>    protected void ProductStock_Click(object sender, EventArgs e)
      {
          int productID = Convert.ToInt32((sender as LinkButton).CommandArgument); /*Pega o id do button que foi clicado*/
  
          Product product = ProductBLL.GetProductByID(productID);
          //cast the sender back to a button
          LinkButton cb = sender as LinkButton;
  
          //get the current gridviewrow from the button namingcontainer
          GridViewRow row = cb.NamingContainer as GridViewRow;
  
          //use findcontrol to locate the textbox in that row
          TextBox tb = row.FindControl("tbStockEntry") as TextBox;
  
          if (tb.Enabled)
          {
              if (tb.Text.Length &gt; 0)
              {
  
                  StockEntry se = new StockEntry();
                  se.Product = product;
                  se.StockEntryQuantity = Convert.ToInt32(tb.Text);
  
                  if (ProductBLL.StockEntryInsert(se) == 1)
                  {
                      cb.Text = GlobalMessages.Saving;
                      stockAddedLabel.Visible = true;
                      stockAddedLabel.Text = GlobalMessages.InsertedStock;
                      Response.AddHeader("REFRESH", "1;URL=ProductList.aspx");
                  }
              }
              else
              {
                  tb.Enabled = false;
                  cb.Text = GlobalMessages.StockEntry;
              }
  
          }
          else
          {
              tb.Enabled = true;
              cb.Text = GlobalMessages.Save;
          }
      }
  </code></pre>