参考代码
Tables("表A").current.locked = TrueFor Each dr As DataRow In Tables("表A").current.DataRow.GetChildRows("表B") dr.locked = TrueNext