以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  锁定行  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=88700)

--  作者:g1j2h3
--  发布时间:2016/8/8 9:17:00
--  锁定行

表格中有单价和图纸两列,如果这两列都有数据,则锁定行,若没有则不能锁定行,请老师帮忙写个代码。谢谢


--  作者:kylin
--  发布时间:2016/8/8 9:45:00
--  

If e.Col.Name = "单价" OrElse e.Col.Name = "图纸" Then
   
    If e.Row.Isnull("单价") = False And e.Row.Isnull("图纸") = False
        e.Row.Locked = True       
    Else       
        e.Row.Locked = False       
    End If
   
End If


--  作者:g1j2h3
--  发布时间:2016/8/8 14:03:00
--  

谢谢老师!