You could use the
CellFormatting
event:
Private Sub DGV_Trans_CellFormatting(ByVal sender As Object, ByVal e As EventArgs) Handles DGV_Trans.CellFormatting
Dim row As DataGridViewRow = DGV_Trans.Rows(e.RowIndex)
If (row.Cells(1).Value = "Buy")
row.Cells(e.ColumnIndex).BackColor = Color.Green
End If
End Sub