以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 复选框异常 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=123104) |
-- 作者:cjl333333333 -- 发布时间:2018/8/8 0:15:00 -- 复选框异常 Dim nms As String() = {"客户简称","产品类别"} \'指定生成目录树的各列 Dim qts As String() = {"\'","\'"} \'指定将各列的值括起来的符号,这里都是字符型,所以都是单引号 Dim trv As WinForm.TreeView = e.Sender Dim flt As String Dim nd As WinForm.TreeNode For Each nd In e.node.allNodes \'清除子节点的选中标记 nd.Checked = False Next nd = e.Node.ParentNode Do While nd IsNot Nothing \'清除父节点的选中标记 nd.Checked = False nd = nd.ParentNode Loop For Each nd In trv.AllNodes If nd.Checked Then Dim rts() As String = nd.FullPath.Split("\\") Dim val As String = "" For i As Integer = 0 To rts.length - 1 If val > "" Then val = val & " And " End If val = val & nms(i) & " = " & qts(i) & rts(i) & qts(i) Next If flt > "" Then flt = flt & " Or (" & val & ")" Else flt = val End If End If Next DataTables("产品资料").LoadFilter = flt DataTables("产品资料").Load 为何我这代码,在打开窗口 目录树控件上没有复选框,所以也就无法选择复选框后加载
|
-- 作者:有点甜 -- 发布时间:2018/8/8 10:04:00 -- 目录树控件->属性->显示复选框->true |
-- 作者:cjl333333333 -- 发布时间:2018/8/8 11:48:00 -- 解决了, 谢谢老师 |