可能这样好一点:
Dim drs As List(Of DataRow) = CurrentTable.Current.DataRow.GetChildRows("关联表")For Each dr As DataRow In drs dr.Locked = TrueNext