using
public
{
BindData();
}
con.Open();
da.SelectCommand.CommandType =
da.Fill(ds,
gvDisplay.DataSource = ds;
gvDisplay.DataBind();
con.Close();
Response.Write(ex.ToString());
gvDisplay.EditIndex = e.NewEditIndex;
gvDisplay.EditIndex = -1;
gvDisplay.Columns[0].ExtractValuesFromCell(e.NewValues, IDcell,
gvDisplay.Columns[1].ExtractValuesFromCell(e.NewValues, Namecell,
gvDisplay.Columns[2].ExtractValuesFromCell(e.NewValues, Departmentcell,
gvDisplay.Columns[3].ExtractValuesFromCell(e.NewValues, Designationcell,
gvDisplay.Columns[4].ExtractValuesFromCell(e.NewValues, Salarycell,
ID = e.NewValues[key].ToString();
Name = e.NewValues[key].ToString();
Department = e.NewValues[key].ToString();
Designation = e.NewValues[key].ToString();
Salary = e.NewValues[key].ToString();
myCommand.CommandType =
myCommand.Parameters.Add(
myCommand.Parameters[
myCommand.ExecuteNonQuery();
Label2.Text += gvDisplay.SelectedRow.Cells.ToString();
}with this code iam not getting updated value in gridview,iam getting previous value only.