foreach(DataGridViewRow row in dataGridView1.Rows)
if(shart)
row.ReadOnly=true;
row.BackColor = Color.Red;