c # muda de cor para uma linha se não estiver vazia

Eu tenho uma tabela e alguns valores nela. Se o "Nome" da célula de linha não estiver vazio, altere a cor do plano de fundo para violeta.

Name    ID    Customers

Niky    1     yes       // here change background to violet
        2     no
Donna   3     yes       // here change background to violet
Baka    4     no        // here change background to violet
        5     yes
        6     no

Eu tentei este código, mas eu não trabalho, não sei porque:

 foreach (DataGridViewRow row1 in dataGridView1.Rows)
        {
            if (row1.Cells[0].Value != null)
            {
                row1.DefaultCellStyle.BackColor = Color.Violet;
            }
        }

questionAnswers(4)

yourAnswerToTheQuestion