帮助使用arraylist存储treeview的数据 [英] Help in storing data of treeview using arraylist

查看:117
本文介绍了帮助使用arraylist存储treeview的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我目前正在杂志编辑器上做一个项目,我想让用户编辑一些在线杂志的页面.

将有一个树状视图,其父节点名为"Page1,Page2",依此类推,子节点将为"Video,Images,Podcast",具体取决于用户选择的内容.用户可以将自己选择的任何内容(例如视频/图像/播客")上传到页面.我知道无法保存整个树视图,因此建议我使用Arraylist来存储不同页面的内容.

由于我是vb.net的新手,所以我不知道如何为树视图创建类和arraylist的编码.

谁能帮忙!!!!
非常感谢!!!!!

Hi. Im currently doing a project on magazine editor and I''m suppose to let the user edit the pages of some online magazine.

There will be a treeview which has parent nodes named, ''Page1, Page2'' & so on and the child nodes will be, ''Video, Images, Podcast'' depending on what the user choose. And the user will be able to upload the whatever he or she selected for example ''video/images/podcast'' to the page. I understand that there is no way to save the whole treeview so I was suggested to use Arraylist to store the contents of the different pages.

As I''m new in vb.net, I''ve no idea how to create the class and the coding for arraylist for the treeview.

Can anyone help!!!!
Thanks a lot !!!!!

推荐答案

永远不需要使用ArrayList.而是使用通用System.Collection.Generic.List.通过在.NET Framework 2.0中引入泛型,使非泛型容器变得过时.

-SA
There is not need to use ArrayList, ever. Instead, use generic System.Collection.Generic.List. Non-generic containers are rendered obsolete with introduction of generics in the .NET Framework 2.0.

—SA


我会考虑使用Dictionary对象.


您不需要ArrayList或其他任何东西树视图的保存".您可以在TreeView对象中拥有所有详细信息.对于树视图结构的实际保存(假设您正在保存),您将需要建立一个数据库(取决于应用程序的大小)以将所有树视图映射到用户.
You do not need ArrayList or anything to do a "save" of the treeview. You can have all the details in the TreeView object. For the actual save of the treeview structure (assuming you are saving that), you will need to have a database set up (depending on the application size) to map all the treeviews to the users.


这篇关于帮助使用arraylist存储treeview的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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