以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]加节点问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=23097) |
||||
-- 作者:aloby -- 发布时间:2012/9/2 11:31:00 -- [求助]加节点问题 表A中的二个窗体:
Dim trv As WinForm.TreeView = Forms("工资").Controls("TreeView1")
Dim nd As WinForm.TreeNode = trv.SelectedNode Dim str0 As String=trv.SelectedNode.fullpath \'记下原始节点名称 Select Case vars("temp1") Case "1" \'增加根节点 nd = trv.Nodes.Add(e.Form.Controls("TextBox1").text ) Dim dr As DataRow = DataTables("工资表").AddNew dr("工资表名") = nd dr("设置") = "字段名" Dim dr1 As DataRow = DataTables("工资表").AddNew 这段代码,既没加行,也没加节点,不知何故
|
||||
-- 作者:狐狸爸爸 -- 发布时间:2012/9/3 8:09:00 -- Dim trv As WinForm.TreeView = Forms("工资").Controls("TreeView1") Dim nd As WinForm.TreeNode = trv.SelectedNode Dim str0 As String=trv.SelectedNode.fullpath \'记下原始节点名称 Messagebos.show("看看是不是等于1:" & vars("temp1")) Select Case vars("temp1") Case "1" \'增加根节点 MessageBox.show("等于1,所以执行了") nd = trv.Nodes.Add(e.Form.Controls("TextBox1").text ) Dim dr As DataRow = DataTables("工资表").AddNew dr("工资表名") = nd dr("设置") = "字段名" Dim dr1 As DataRow = DataTables("工资表").AddNew [此贴子已经被作者于2012-9-3 8:09:12编辑过]
|