以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]关于树形目录的节点求助! (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=4532) |
||||
-- 作者:roy78 -- 发布时间:2009/10/9 10:17:00 -- [求助]关于树形目录的节点求助! 此主题相关图片如下:1.bmp
隶属于2大类的小类,怎么跑到4类去了?望指点。。(非自动生成) |
||||
-- 作者:roy78 -- 发布时间:2009/10/9 10:41:00 -- 急待解决 |
||||
-- 作者:狐狸爸爸 -- 发布时间:2009/10/9 10:47:00 -- 你不排序的话,就是按照输入顺序了,正确的代码应该是: Dim tabmb As WinForm.TabControl = e.Form.Controls("TabControl1") Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1") Dim nd As WinForm.TreeNode tables("产品类型基础资料1_Table1").fill("select * from tProductType","zmsteel",false) For Each dr as DataRow in tables("产品类型基础资料1_Table1").DataTable.Select("","fCode") If dr.IsNull("fParentCode") Then nd =tr.Nodes.Add("root1","" & dr("fCode") & " " & dr("fname") & "") else nd.Nodes.Add("Sub1"," " & dr("fCode") & " " & dr("fname") & " ") End If Next |
||||
-- 作者:czy -- 发布时间:2009/10/9 10:51:00 -- Dim tabmb As WinForm.TabControl = e.Form.Controls("TabControl1") Dim tr As WinForm.TreeView = e.Form.Controls("TreeView1") Dim nd As WinForm.TreeNode tables("产品类型基础资料1_Table1").fill("select * from tProductType","zmsteel",false) Dim drs As List(Of DataRow) = DataTables("tProductType").Select("[fName] Is Not Null", "fCode,fName Desc") For Each dr as DataRow in drs \'.Count - 1 If dr.IsNull("fParentCode") Then nd =tr.Nodes.Add("root1","" & dr("fCode") & " " & dr("fname") & "") else nd.Nodes.Add("Sub1"," " & dr("fCode") & " " & dr("fname") & " ") End If Next [此贴子已经被作者于2009-10-9 10:52:32编辑过]
|
||||
-- 作者:roy78 -- 发布时间:2009/10/9 11:00:00 -- 辛苦了,OK了,呵呵 |