Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
一行中包含ABC三列,正确的是只能且必须选填一列,存盘时或者这行编辑完毕时验证代码如何设置
三列均不填或同时填两列以上均错
用这个事件:
http://www.foxtable.com/help/topics/0628.htm
如果是非逻辑列:
Dim dr as datarow = e.datarow
dim cnt as integer
cnt = iif(dr.isnull("a"),0,1) + iif(dr.isnull("b"),0,1) + iif(dr.isnull("c"),0,1)
if cnt <> 1 then
e.cancel = true
messagebox.show("错误")
end if
如果是逻辑列:
Dim dr as datarow = e.datarow
dim cnt as integer
cnt = iif(dr("a"),1,0) + iif(dr("b"),1,0) + iif(dr("c"),1,0)
if cnt <> 1 then
e.cancel = true
messagebox.show("错误")
end if
具体还是搞不定呀,狐爸帮帮忙