كود :
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
DataGridView1.Rows.Add(1, 100, 0)
DataGridView1.Rows.Add(2, 200, 0)
DataGridView1.Rows.Add(3, 250, 0)
DataGridView1.Rows.Add(4, 200, 0)
DataGridView1.Rows.Add(5, 300, 0)
DataGridView1.Rows.Add(6, 100, 0)
DataGridView1.Rows.Add(7, 100, 0)
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim ggg As Double = 0
Dim ggg1 As Double = 0
For i As Integer = 0 To DataGridView1.Rows.Count - 1
If i > 0 Then
ggg = DataGridView1.Rows(i - 1).Cells(1).Value
ggg1 = DataGridView1.Rows(i).Cells(1).Value
If ggg > ggg1 Then
DataGridView1.Rows(i).Cells(2).Value = "\/"
ElseIf ggg < ggg1 Then
DataGridView1.Rows(i).Cells(2).Value = "/\"
Else
DataGridView1.Rows(i).Cells(2).Value = "="
End If
End If
Next
End Subسبحان الله وبحمده سبحان الله العظيم و الحمد لله ولا اله الا الله والله اكبر
