If e.DataCol.Name = "入库核销" Then '如果是入库核销列的内容变动 If e.NewValue = True Then '而且变动后的值是True(已勾选) If e.DataRow.IsNull("仓库") Then '仓库是否为空 e.DataRow("仓库") = Nothing End If End IfEnd If
入库核销取消勾选 仓库的值清空 这样写没变化