DataColChanged事件
If e.DataCol.Name = "结果"
Dim t As Table = Tables(e.DataTable.Name)
Dim idx As Integer = t.FindRow(e.DataRow)
If idx >= 10 Then
Dim str As String = ""
Dim a As Integer = idx - 10
For i As Integer = idx To a Step -1
str = str & t.Rows(i)("结果")
Next
'Output.Show(str)
If str = "10111011000" Then
e.DataRow("确认") = 1
End If
End If
End If
或者命令窗口直接执行
Dim t As Table = Tables("记录_5")
Dim str As String = "***********"
Dim s1 As String = "00011011101"
t.StopRedraw
For i As Integer = 0 To t.Rows.Count - 1
str = str.SubString(1) & t.Rows(i)("结果")
If str = s1 Then
Output.Show(str)
t.Rows(i)("确认") = 1
End If
Next
t.ResumeRedraw