代码
Dim dr As DataRow = e.DataRowSelect Case e.DataCol.Name Case "单价","调拨","采购" If e.DataRow("调整") = False Then dr("金额") = dr("单价") * (dr("调拨") + dr("采购")) End If Case "金额" e.DataRow("调整") = dr("金额") <> dr("单价") * (dr("调拨") + dr("采购"))End Select