1、编写prepareEdit事件
if e.col.name = "是否结账" andalso e.row.isnull("结账日期") then
e.cancel = true
end if
2、编写datacolchanged事件
if e.datacol.name = "结账日期" andalso e.datarow.isnull("结账日期") = false then
e.datarow("是否结账") = true
end if
3、编写datacolchanged事件
if e.datacol.name = "是否结账" andalso e.newValue = true then
e.datarow.Locked = true
end if