以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]如果判断一个row内的值是否包含当前用户名 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=8908) |
-- 作者:ddlzq -- 发布时间:2010/12/23 18:07:00 -- [求助]如果判断一个row内的值是否包含当前用户名 各位老师: 假如一行,一个单元格中有值为用户名: 张三、李四、王五。如何能判断此行另一个单元格,通过当前用户名判断,如果当前用户名包含那个单元格用户名时,另一个单元就有权限编辑,否则就无法编辑? 我是这么编的 在PrepareEdit中判断 if e.row("填写内容") isnot nothing then If user.name Like "%" & e.Row("用户权限") & "%" Then else e.cancel = true end if end if end if 为何不好使呢?
[此贴子已经被作者于2010-12-23 18:07:05编辑过]
|
-- 作者:狐狸爸爸 -- 发布时间:2010/12/23 18:11:00 -- \'\'\' If e.col.name = "填写内容" Then If e.Row("填写内容") isnot Nothing Then e.Cancel = True Dim nms() As String = e.Row("用户权限").split("、") For Each nm As String In nms If user.Name = nm Then e.Cancel = False End If Next End If End If [此贴子已经被作者于2010-12-23 18:11:02编辑过]
|
-- 作者:ddlzq -- 发布时间:2010/12/23 20:14:00 -- 谢谢狐爸,我消化消化... ![]() |