通过ado.net从数据库填充treeview [英] Populate treeview from database by ado.net

查看:60
本文介绍了通过ado.net从数据库填充treeview的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两张桌子

表1父母

-Id int

-TariffPointsMain nvarchar



表2孩子

-Id int

-ParentId int

-TariffPointsSub nvarchar



我必须将这些表填充到TreeView并绑定到文本框



i使用C#和SqlServer2008,以及Ado.net

I have Two Table
Table 1 "Parent"
-Id int
-TariffPointsMain nvarchar

Table 2 "Child"
-Id int
-ParentId int
-TariffPointsSub nvarchar

Please I have to populate this tables to TreeView and bind to textbox

i use C# And SqlServer2008, and Ado.net

推荐答案

请参阅以下链接获取类似文章:

从Windows窗体和C#中的数据库创建TreeView [ ^ ]

如何将数据从数据库加载到TreeView [ ^ ]

从数据库填充TreeView控件 [ ^ ]





- Amit
Refer the links below for similar articles:
Create a TreeView from a Database in Windows Forms and C#[^]
How to load data from database to TreeView[^]
Populating a TreeView Control from the Database[^]


--Amit


试试这个...对你有帮助... :)



http://blog.dragonsoft.us/ 2008/10/28 / populate-treeview-from-table-in-aspnet / [ ^ ]
Try this...may be helpful to you...:)

http://blog.dragonsoft.us/2008/10/28/populate-treeview-from-table-in-aspnet/[^]


这篇关于通过ado.net从数据库填充treeview的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆