For cells your code should work:
DataGridView2.Rows(0).Cells(0).Style.BackColor = Color.Green
For rows:
DataGridView2.Rows(0).DefaultCellStyle.BackColor = Color.Green
or:
DataGridView2.Rows(DataGridView2.CurrentRow.Index).DefaultCellStyle.BackColor = Color.Green