本文介绍了嵌套树模型到Windows窗体TreeView。这甚至不是一个问题。我需要一些帮助才能做出决定。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有功课要做,我卡住了:( 一些数据: I have homework to do, and i stuck :(Some data:create table forest ( tre int, lft int, rgt int, itm varchar(255));insert into forest (tre, lft, rgt, itm) values (1, 1, 10, 'computer A');insert into forest (tre, lft, rgt, itm) values (1, 2, 7, 'mainboard');insert into forest (tre, lft, rgt, itm) values (1, 3, 4, 'processor');insert into forest (tre, lft, rgt, itm) values (1, 5, 6, 'vga');insert into forest (tre, lft, rgt, itm) values (1, 8, 9, 'hdd');insert into forest (tre, lft, rgt, itm) values (2, 1, 14, 'computer B');insert into forest (tre, lft, rgt, itm) values (2, 2, 13, 'mainboard');insert into forest (tre, lft, rgt, itm) values (2, 3, 4, 'processor');insert into forest (tre, lft, rgt, itm) values (2, 5, 6, 'vga');insert into forest (tre, lft, rgt, itm) values (2, 7, 12, 'raid');insert into forest (tre, lft, rgt, itm) values (2, 8, 9, 'hdd a');insert into forest (tre, lft, rgt, itm) values (2, 10, 11, 'hdd b'); tre - 树的价值 lft,rgt - 树上的地方标记 itm - 一些数据 用户点击[Rise trees]按钮。 数据到达[Forest],强类型DataTable ,与SQL中的'forest'结构相同。 tre - id of treelft, rgt - mark of place in treeitm - some dataUser click [Rise trees] button.Data are getting to [Forest], strong typed DataTable, with same structure as 'forest' in SQL.private sub RiseTrees() dim drw as ForestRow For Each drw In Forest.Rows ' what the hell should i do here ??? Nextend sub 我找到了示例,向treeview显示了导入邻接模型,但我必须先将NestedTree转换为AdjacencyTree。 还有更好的办法吗? PS。我使用Visual Studio 2005 Standard with .NET 2.0 I found examples, showing import adjacency model to treeview, but i have to first convert NestedTree to AdjacencyTree.Is there any better way?PS. I use Visual Studio 2005 Standard with .NET 2.0推荐答案 这篇关于嵌套树模型到Windows窗体TreeView。这甚至不是一个问题。我需要一些帮助才能做出决定。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 11-03 00:06