从数据库填充树视图 [英] Populate Tree View from Database

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

问题描述

美好的一天,我正在尝试开发一个归档系统,该系统可以将word文件,pdf,excel文件,图像等上载到数据库服务器.这些文件可以由来自不同部门的不同用户上载,我想在vb.net 2010中的树视图组件上显示部门列表,如何用数据库中可用的部门填充树视图?并且如果我展开树状视图,我想在展开的部门下显示用户的名称.我不知道在树状视图中是否可行,因为我仅使用它来显示本地驱动器中的文件夹.这里有人知道怎么做吗?在此先感谢大家的任何意见或建议.

Good day, I am experimenting to develop an archiving system that can upload word files, pdf, excel files, images, etc. to a database server. Those files can be upload by different users from different departments, i want to display the department list on a tree view component in vb.net 2010, how can i populate the tree view with the departments available from my database? and also if i expand the tree view, i want to display the names of the users under the expanded department. I don''t know if that is possible in tree view because i only use it to display folders from my local drive. Is there anyone here knows how to do it? Thanks in advance guys, any comment or suggestion is appreciated.

推荐答案

看看这个: http://www.developerfusion.com/tools/convert/csharp-to-vb/">http ://www.developerfusion.com/tools/convert/csharp-to-vb/ [ ^ ]
Have a look at this: Populating a TreeView Control from the Database[^] it''s in C#, but it covers doing exactly what you want. Translating it to VB isn''t difficult - there are online translators which do most of it for you: http://www.developerfusion.com/tools/convert/csharp-to-vb/[^]


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

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