DataColChanged事件
If e.DataCol.name = "数量" Then
Dim fdr As DataRow = DataTables("产品仓库占比").find("编码 = '" & e.DataRow("编号") & "'")
If fdr Is Nothing Then
e.DataRow("第1号仓库") = Nothing
e.DataRow("第2号仓库") = Nothing
Else
e.DataRow("第1号仓库") = fdr("第1号仓库占比") * e.DataRow("数量")
e.DataRow("第2号仓库") = fdr("第2号仓库占比") * e.DataRow("数量")
End If
End If