--
If e.DataCol.Name = "班级ID" Then
Tables("表AA").AddNew()
If e.NewValue Is Nothing Then
e.DataRow("班级") = Nothing
e.DataRow("课程") = Nothing
Else
Dim drs As List(Of DataRow)
drs = DataTables("表BB").select("[班级ID] = \'" & e.NewValue & "\'")
For Each dr As DataRow In drs
If dr IsNot Nothing Then
e.DataRow("班级") = drs("班级")
e.DataRow("课程") = drs("课程")
End If
Next
End If
End If
报错。提示班级ID不是INT