以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 目录树赋值 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=97300) |
-- 作者:cqli -- 发布时间:2017/3/9 14:59:00 -- 目录树赋值 你好! 被勾选的多个节点不能全部赋值,请帮忙改下代码 Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") For Each nd As WinForm.TreeNode In trv.AllNodes If nd.Checked = True e.Form.DropDownBox.Value = nd.text e.Form.DropDownBox.CloseDropdown() End If Next
|
-- 作者:有点色 -- 发布时间:2017/3/9 15:22:00 -- Dim trv As WinForm.TreeView = e.Form.Controls("TreeView1") Dim str As String = "" For Each nd As WinForm.TreeNode In trv.AllNodes If nd.Checked = True str &= nd.Text & "," End If Next e.Form.DropDownBox.Value = str.trim(",") e.Form.DropDownBox.CloseDropdown() |