If e.Col.name = "分配A"
Dim cl As String
Dim db As DataTable = DataTables("组织机构")
Dim dr As DataRow
Dim q As Integer
For i As Integer = 0 To 6
dr = db.find("权限" & i & " = \'技术部\'","权限")
If dr IsNot Nothing
q = dr("权限") - 1
Exit For
End If
Next
For i As Integer = q To 6
If i < 6
cl += "权限" & i & "|"
Else
cl += "权限" & i
End If
Next
Dim tbq As new droptreebuilder
tbq.sourcetable = DataTables("组织机构")
tbq.treefilter = "权限" & q & " = \'技术部\' or 权限" & q & " = \'工程部\'"
tbq.treecols = cl
\'tbq.treecols = "权限" & q & "|权限" & q + 1
\'tbq.sourcecols = "权限" & q & "|权限" & q + 1
\'tbq.sourcecols = cl
tbq.receivecols = "分配A|分配B"
Tables(e.Form.name & "_table1").Cols("分配A").droptree = tbq.build()
End If
上面的代码实现不了我的要求,请问,要实现我的要求,应该如何修改代码?
恳请老师答疑