I got the solution....... and it is working the way i want... following is the code.
foreach (DataGridViewRow dr in dgvPendingApprovals.Rows)
{
int rid = int.Parse(dgvPendingApprovals[1, dr.Index].Value.ToString());
DataGridViewCheckBoxCell ch1 = new DataGridViewCheckBoxCell();
ch1 = (DataGridViewCheckBoxCell)dr.Cells[0];
try
{
switch (ch1.Value.ToString())
{
case "False":
ch1.Value = false;
break;
case "True":
cmd.CommandText = "Update ApplicantDetails set Status2 = 'Yes', ApprovedDate2 = getdate() where Id = '" + rid + "'";
cmd.Connection = conobj.getConn();
conobj.openCon();
cmd.ExecuteNonQuery();
conobj.closeCon();
rid = 0;
break;
}
}
catch { }
}