I started getting this error lately and i'm not sure why. Nothing new has changed and I could really use some help
If e.Value = "Departure" Then
dgvNotify.Item(0, e.RowIndex).Style.BackColor = Color.LightPink
dgvNotify.Item(1, e.RowIndex).Style.BackColor = Color.LightPink
dgvNotify.Item(2, e.RowIndex).Style.BackColor = Color.LightPink
'dgvNotify.DefaultCellStyle.SelectionBackColor = Color.LightPink
'dgvNotify.DefaultCellStyle.SelectionForeColor = dgvNotify.DefaultCellStyle.ForeColor
Else
dgvNotify.Item(0, e.RowIndex).Style.BackColor = Color.LightGreen
dgvNotify.Item(1, e.RowIndex).Style.BackColor = Color.LightGreen
dgvNotify.Item(2, e.RowIndex).Style.BackColor = Color.LightGreen
'dgvNotify.DefaultCellStyle.SelectionBackColor = Color.LightGreen
'dgvNotify.DefaultCellStyle.SelectionForeColor = dgvNotify.DefaultCellStyle.ForeColor
End If
End If
End Sub