如果是表达式,
就这样写 iif(赠品=true, null, 单价*数量)
代码
If e.DataCol.name = "赠品" Then If e.DataRow("赠品") = True Then e.DataRow("金额")=Nothing Else e.DataRow("金额")=e.DataRow("单位")*e.DataRow("数量") End IfEnd If