hello everyone
i try to explain my problem by this following example
i have a gridview binded to a table with columns as(name,rollno,status, and last column of the gridview contains a checkbox)
now the problem is i want when i check the checkbox of a particular row...then the status column value on that particular row to be changed/updated....
i m doing like dis
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
SqlCommand cmd = new SqlCommand();
cmd.Connection = conn;
cmd.CommandText = " update dummytable set status =@status";
cmd.Parameters.Add("@status", SqlDbType.NVarChar, 50).Value = "dispproved";
cmd.ExecuteNonQuery();
cmd.Dispose();
GridView1.DataBind();
conn.Close();
}
now wat is happening ....it updates for all the rows...not for the particular row...pls help thank u....