in command write update and delete query which will update the data. u have simply write select query.
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
GridViewRow row=(GridViewRow)GridView1.Rows[e.RowIndex];
Label lbldeleteid = (Label)row.FindControl("lblID");
conn.Open();
SqlCommand cmd = new SqlCommand("delete FROM tbl_SqlImage where id="+ lbldeleteid.Text, conn);
cmd.ExecuteNonQuery();
conn.Close();
bind();
}
in update write
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
SqlCommand cmd = new SqlCommand("update tbl_SqlImage set Name='"+ textName.text +"' where id="+ lbldeleteid.Text, conn);
}
for more look in this
article[
^]