DataColChanged事件
If e.DataCol.Name = "领料单号" Then
If e.DataRow.isNull("领料单号") Then
e.DataRow("客户名称") = Nothing
Else
Dim fdr As DataRow = DataTables("销售订单").find("领料单号 = '" & e.DataRow("领料单号") & "'")
If fdr IsNot Nothing Then
e.DataRow("客户名称") = fdr("客户名称")
Else
e.DataRow("客户名称") = "没有查到"
End If
End If
End If
[此贴子已经被作者于2016/11/4 14:21:39编辑过]