列二和列三赋值后会不会触发其它事件?
If e.DataCol.Name = "列一" Then
If e.DataRow.IsNull("列一") Then
e.DataRow("列二") = Nothing
Else
If len(e.NewValue ) >= 3 Then
msgbox(e.NewValue) ‘出错时这里显示什么内容
e.DataRow("列二") = e.NewValue.Substring(0,3)
'从表二中读取列三内容.
Dim dr3 As DataRow = DataTables("表二").Find("列一 = '" & e.newValue & "'")
If dr3 Is Nothing Then
e.DataRow("列三") = "错误"
Else
e.DataRow("列三") = dr3("列三")
End If
Else
e.DataRow("列一") = "错误"
e.DataRow("列二") = ""
End If
End If
End If