以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]可多选的通用筛选目录树 单元格斜线多值失效,请教 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=103851) |
||||
-- 作者:湛江智 -- 发布时间:2017/7/18 16:06:00 -- [求助]可多选的通用筛选目录树 单元格斜线多值失效,请教 可多选的通用筛选目录树 单元格斜线多值失效,请教 及下拉窗口点击节点含上级节点一并输入
[此贴子已经被作者于2017/7/18 16:18:06编辑过]
|
||||
-- 作者:湛江智 -- 发布时间:2017/7/18 16:14:00 -- 添加附件,压缩包、狐表、access数据库文件上传失败,是网站有问题还是我这边网络问题呢? 左边目录树用下面链接的代码
[分享] 通用单选目录树 http://www.foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=44200&replyID=&skin=1 [此贴子已经被作者于2017/7/18 16:29:37编辑过]
|
||||
-- 作者:有点甜 -- 发布时间:2017/7/18 16:28:00 -- 目录树尽量不要用 \\ 这样的name或者text,不然代码要改。
建议把 c:\\@f@ 改成 c:/@f@ 这样就不需要改代码 |
||||
-- 作者:有点甜 -- 发布时间:2017/7/18 16:29:00 -- 以下是引用湛江智在2017/7/18 16:14:00的发言:
添加附件,压缩包、狐表、access数据库文件上传失败,是网站有问题还是我这边网络问题呢?
1、使用ie浏览器访问论坛;
2、压缩包文件不能大于2M。 |
||||
-- 作者:湛江智 -- 发布时间:2017/7/18 17:03:00 --
项目代码老大帮忙改一下了,因为要生成文件夹路径 斜线不能变 项目文件在上面,先谢了
|
||||
-- 作者:有点甜 -- 发布时间:2017/7/18 17:10:00 -- c:\\test.jpg 和 c:/test.jpg 是等效的,都可以正常访问路径。 |
||||
-- 作者:有点甜 -- 发布时间:2017/7/18 17:16:00 -- Dim s As String = e.Form.Controls("CheckedComboBox筛选树").Text Dim Colstr() As String Dim qts As String() = {"\'","#",""} Dim trv As WinForm.TreeView = e.Sender Dim flt As String = "" Dim nd As WinForm.TreeNode Dim pd As WinForm.TreeNode Dim notchecked As Integer = 0 Colstr = s.split("|") For i As Integer = 0 To Colstr.Length - 1 If CurrentTable.Cols.Contains(Colstr(i)) = False Then If trv.Nodes.Count > 0 Then trv.Nodes.Clear() End If e.Form.Controls("CheckedComboBox筛选树").Text = "选择筛选列(最好包括拼音)" Return End If Next If e.Node.Name = "显示所有行" Then If e.Node.Checked = True Then For Each nd In trv.AllNodes If nd.Name <> "显示所有行" Then nd.Checked = False End If Next CurrentTable.Filter = "" Else For Each nd In trv.AllNodes nd.Checked = False Next CurrentTable.Filter = (1 = 2) End If trv.CollapseAll Return Else trv.AllNodes(0).Checked = False End If For Each nd In e.node.allNodes nd.Checked = False Next pd = e.Node.ParentNode Do While pd IsNot Nothing pd.Checked = False pd = pd.ParentNode Loop For Each nd In trv.AllNodes If nd.Checked Then Dim rts(nd.level) As String Dim tnd = nd For i As Integer = nd.level To 0 Step-1 rts(i) = tnd.text tnd = tnd.ParentNode Next Dim val As String = "" For i As Integer = 0 To rts.length - 1 If CurrentTable.DataTable.DataCols(Colstr(i)).IsString Then If rts(i) <> "空" Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0) End If ElseIf rts(i) = "空" Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf CurrentTable.DataTable.DataCols(Colstr(i)).IsDate Then If rts(i) <> #0001-1-1 0:00:00# Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1) Else val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1) End If ElseIf rts(i) = #0001-1-1 0:00:00# Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf CurrentTable.DataTable.DataCols(Colstr(i)).IsNumeric Then If rts(i) <> 0 Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2) Else val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2) End If ElseIf rts(i) = 0 Then If val > "" Then val = val & " And " val = val & Colstr(i) & " Is Null" Else val = val & Colstr(i) & " Is Null" End If End If ElseIf CurrentTable.DataTable.DataCols(Colstr(i)).IsBoolean Then If rts(i) <> False Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & True & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & True & qts(0) End If ElseIf rts(i) = False Then If val > "" Then val = val & " And " val = val & Colstr(i) & " = " & qts(0) & False & qts(0) Else val = val & Colstr(i) & " = " & qts(0) & False & qts(0) End If End If End If Next If flt > "" Then flt = flt & " Or (" & val & ")" Else flt = val End If notchecked + = 1 End If Next If flt > "" AndAlso notchecked > 0 Then CurrentTable.Filter = flt Else CurrentTable.Filter = (1 = 2) End If |
||||
-- 作者:湛江智 -- 发布时间:2017/7/18 17:32:00 -- 老大,单元格下拉窗口,选择目录树子节点,把上面的节点也一起输入代码怎么修改呢? 比如选择节点:上海,输入值为:中国\\上海 见1楼图片
|
||||
-- 作者:有点甜 -- 发布时间:2017/7/18 17:39:00 -- 以下是引用湛江智在2017/7/18 17:32:00的发言:
老大,单元格下拉窗口,选择目录树子节点,把上面的节点也一起输入代码怎么修改呢? 比如选择节点:上海,输入值为:中国\\上海
见1楼图片
e.Form.DropDownBox.Value = e.Node.FullPath |
||||
-- 作者:湛江智 -- 发布时间:2017/7/18 17:42:00 -- 可以了,多谢老师 |