以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教取消锁定行问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=196204)

--  作者:13315253800
--  发布时间:2025/4/8 15:46:00
--  请教取消锁定行问题

蓝老师当主表"订单"锁定当前行时,可同时锁定其对应的全部子表明细"订单明细",我要取消锁定主表的选定行,如何用代码同时取消其对应子表的全部明细行,请蓝老师指导一下

\'取消锁定行

        With Tables("订单")

            If .Current IsNot Nothing Then

                .Current.Locked = False

            End If

        End With


--  作者:有点蓝
--  发布时间:2025/4/8 15:50:00
--  
参考:http://www.foxtable.com/webhelp/topics/0636.htm
--  作者:13315253800
--  发布时间:2025/4/8 16:07:00
--  
蓝老师我在订单表的DataRowLockedChanged事件代码设置为:

For Each dr As DataRow In e.DataRow.GetChildRows("订单明细")

    dr.Locked = e.DataRow.Locked

Next

在订单表中解锁行时,相应的"订单明细"未能解锁



--  作者:13315253800
--  发布时间:2025/4/8 16:09:00
--  
抱歉,解决了