Hi
One thing. You may be better off to use a datatable and do any calculations on its contents rather than on the DataGridView contents, and just use the DataGridView to display the data. Of course, there are arguments to just use the DataGridView directly.
Anyway, based on the limits of your question, and on my previous answer to your earlier question, her is some example code.
This example adds 2 more columns to the DataTable and is also dynamic in that when the textbox value is changed then the results are auto generated. You did not specify what the column should be when NOT "High" so I just used "Low".
Disclaimer: if this example is of no use to you then just crumple it up and throw in the trash!
' Form1 with
' DataGridView1
' TextBox1
Option Strict On
Option Explicit On
Public Class Form1
Dim dt As New DataTable("freddy")
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
With dt
.Columns.Add("One", GetType(Integer))
.Columns.Add("Limit", GetType(Integer))
.Columns.Add("Result", GetType(Integer), "One > Limit")
' --------
dt.Columns.Add("Added Col1", GetType(Integer))
dt.Columns.Add("Added Col2", GetType(String))
' --------
Dim r As New Random
For i As Integer = 0 To 99
.Rows.Add(r.Next(-5, 5), Nothing, Nothing, r.Next(0, 6))
Next
End With
DataGridView1.DataSource = dt
TextBox1.Text = "2"
' this line will hide the Limit
' column (uncomment to see)
' DataGridView1.Columns("Limit").Visible = False
End Sub
Function GetInteger(s As String) As Integer
Dim v As Integer = 0
If Integer.TryParse(s, v) Then Return v
Return 0
End Function
Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
Dim v As Integer = GetInteger(TextBox1.Text)
For i As Integer = 0 To dt.Rows.Count - 1
dt(i)("Limit") = v
dt(i)("Added Col2") = IIf(GetInteger(dt(i)("Added Col1").ToString) > 2, "High", "Low")
Next
End Sub
End Class