DataColChanged事件:
Dim dr As DataRow = e.DataRowSelect Case e.DataCol.Name Case "数量","单价"
SystemReady = Falsedr("金额") = dr("数量") * dr("单价")SystemReady = TrueEnd Select
Select Case e.DataCol.Name Case "数量","金额"
SystemReady = False
if dr("数量") = 0
dr("单价") = nothing
elsedr("单价") = dr("金额") / dr("数量")
end ufSystemReady = TrueEnd Select