DataRowLockedChanging中的代码
If e.DataRow("审核确认")
= False Then '未审核通过的行
If e.DataRow.Locked = False Then '如果此行目前未锁定,也就是准备锁定此行
Messagebox.show("不能锁定未审核通过的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
End If
ElseIf e.DataRow("审核确认") = True Then '已经审核通过的行
If e.DataRow.Locked = True Then '如果此行已锁定,也就是准备取消锁定此行
If User.Group <> "经理组"
Then
Messagebox.show("只有经理才能解锁已经审核通过的行!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
e.Cancel = True
End If
End If
End If
设置好后,无效果,点击审核确认逻辑列,无锁定和对话框出现。是啥原因呢?