title: GridView row values not changed after update
body: <p>I want to update row in <code>GridView</code> with this code but after editing <code>GridView</code> not changes:</p>
  
  <pre><code>protected void res_RowUpdating(object sender, GridViewUpdateEventArgs e)
      {
          //Retrieve the table from the session object.
          DataTable dt = (DataTable)Session["dt"];
          GridViewRow row =res.Rows[e.RowIndex];
          dt.Rows[row.DataItemIndex]["name"] = ((TextBox)(row.Cells[6].Controls[0])).Text;
          dt.Rows[row.DataItemIndex]["dewey"] = ((TextBox)(row.Cells[5].Controls[0])).Text;
          *dt.Rows[row.DataItemIndex]["subject"] = ((TextBox)(row.Cells[4].Controls[0])).Text;
          Session["dt"] = dt;
          res.EditIndex = -1;
          res.DataSource = dt;
          res.DataBind();
      }
  </code></pre>
  
  <p>my <code>Page_Load</code>:</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          DataTable dt;
          if (!IsPostBack)
          {
              dt= Converter.ListBooks(new classes.Book().GetAll());
              Session["dt"] = dt;
              res.DataSource = dt;
              res.DataBind();
          }
          else
          {
              dt=(DataTable)Session["dt"];
              res.DataSource = dt;
              res.DataBind();
          }
  
      }
  </code></pre>
  
  <p>for example I changed line that have * to this:</p>
  
  <pre><code>dt.Rows[row.DataItemIndex]["subject"] = "tx";
  </code></pre>
  
  <p>and after edit "subject" column changed to "tx", so I don't know why <code>((TextBox)(row.Cells[4].Controls[0])).Text</code> return <code>TextBox</code>'s text before edit?</p>