01.
Private
Sub
Form1_Load(sender
As
Object
, e
As
EventArgs)
Handles
MyBase
.Load
02.
For
i
As
Integer
= 0
To
20
03.
DataGridView1.Rows.Add(
"TOR Detail 1"
& i,
"TOR Detail 2"
& i,
New
Random().
Next
(0, 20))
04.
System.Threading.Thread.Sleep(100)
05.
Next
06.
07.
08.
For
i
As
Integer
= 0
To
DataGridView1.RowCount - 1
09.
If
Convert.ToInt16(DataGridView1(2, i).Value) < 3
Then
10.
DataGridView1(2, i).Style.BackColor = Color.Red
11.
ElseIf
Convert.ToInt16(DataGridView1(2, i).Value) >= 3
And
Convert.ToInt16(DataGridView1(2, i).Value) <= 10
Then
12.
DataGridView1(2, i).Style.BackColor = Color.Yellow
13.
ElseIf
Convert.ToInt16(DataGridView1(2, i).Value) > 10
Then
14.
DataGridView1(2, i).Style.BackColor = Color.Aqua
15.
16.
End
If
17.
18.
Next
19.
20.
End
Sub