加一个判断吧:
Dim ctl As WinForm.Control = e.Sender
If Tables("表A").Current.Locked = True Then '如果锁定了行
ctl.Readonly = BooleanEnum.True '禁止编辑
Else '否则进行其他判断
Select Case ctl.BindingField
Case "表A.第一列", "表A.第二列", "表A.第三列"
If User.Name = "张三" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
Case "表A.第四列", "表A.第五列", "表A.第六列"
If User.Name = "李四" Then
ctl.ReadOnly = BooleanEnum.False '允许编辑
Else
ctl.ReadOnly = BooleanEnum.True '禁止编辑
End If
End Select
End If