A表批号、米数、重量列,B表批号(表达式列)、米数、重量 ,以下代码引用不了代码:If e.DataCol.Name = "批号" Then
Dim nms() As String = {"米数","重量"}
If e.NewValue Is Nothing Then
For Each nm As String In nms
e.DataRow(nm) = Nothing
Next
Else
Dim dr As DataRow
dr = DataTables("A表").Find("[批号] = '" & e.NewValue & "'")
If dr IsNot Nothing
For Each nm As String In nms
e.DataRow(nm) = dr(nm)
Next
End If
End If
End If