check this code
private void datagridview_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
if (Convert.ToString(datagridview[e.Columnindex,e.RowIndex].value)=="somevalue")
datagridview.Rows[e.RowIndex].Cells[e.ColumnIndex].Style.BackColor = Color.Red;
}