代码
If e.DataCol.name = "赠品" Then If e.DataRow("赠品") = True Then e.DataRow("金额")=Nothing Else e.DataRow("金额")=e.DataRow("单位")*e.DataRow("数量") End IfEnd If