入库表datacolchanged事件If e.DataCol.name = "入库" Then
If e.newvalue = True
Dim dr As DataRow = DataTables("可用库存").addnew
dr("block批号") = e.DataRow("block批号")
dr("某列") = e.DataRow("某列")
End If
ElseIf If e.DataCol.name = "锁定" Then
If e.newvalue = True
Dim dr As DataRow = DataTables("可用库存").find("block批号='" & e.DataRow("block批号") & "'")
If dr IsNot Nothing Then
dr.Delete
End If
End If
End If
表"block上料"datacolchanged用法一样,参考上面自己做