I am trying to develop a simple inventory system in VB.NET. I now have all the database set up and would like to know if there is any code that I can refer to that alert users when the stock is low (e.g pop out window informing users that stock is low or change the number of stock in the database table into different colours.
I have tried this code but it starts to highlight all the cumulus. I want to highlight a specific cell which is called Quantity so when the quantity is lower then 10 i want that quantity cell to get highlighted red.
For i As Integer = 0 To Me.ProductsDataGridView.Rows.Count - 1
If Me.ProductsDataGridView.Rows(i).Cells(0).Value < 10 Then
Me.ProductsDataGridView.Rows(i).Cells(0).Style.BackColor = Color.Red
MsgBox("Low on stock")
End If
Next
I will really appreciate any advice Thank You.