473,386 Members | 1,602 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Populating a treeview from Text

I need to populate a treeview from a text file. The data in it is in
the following form

1. (Parent Node)
(a) (Child Node)
(b) (Child Node)
..
..
..
(k) (Child Node)

2. (Parent Node)
(a) (Child Node)
and so on..

The data in the treeview will remain static. I do not need any dynamic
loading or update. It would be best if I can load the data into the
treeview during design time. I want an automated process as there are
over 50 parent nodes each with 10-15 child nodes. I dont want to sit
and type each one individually.

Thanks
Nitin
Sep 15 '08 #1
2 3437

"Maddy" wrote:
I need to populate a treeview from a text file. The data in it is in
the following form

1. (Parent Node)
(a) (Child Node)
(b) (Child Node)
..
..
..
(k) (Child Node)

2. (Parent Node)
(a) (Child Node)
and so on..

The data in the treeview will remain static. I do not need any dynamic
loading or update. It would be best if I can load the data into the
treeview during design time. I want an automated process as there are
over 50 parent nodes each with 10-15 child nodes. I dont want to sit
and type each one individually.

Thanks
Nitin
Hi Nitin,

If you read the file, parse and create TreeNodes during a UserControl load
event, the data will be visible during design time if you put the UserControl
in another Form or UserControl. Just create a UserControl and add a TreeView
with DockStyle.Filled.

--
Happy Coding!
Morten Wennevik [C# MVP]

Sep 16 '08 #2
>
If you read the file, parse and create TreeNodes during a UserControl load
event, the data will be visible during design time if you put the UserControl
in another Form or UserControl. *Just create a UserControl and add a TreeView
with DockStyle.Filled.

--
Happy Coding!
Morten Wennevik [C# MVP]
Thanks for the response. But I am a newbie. Could you please tell in a
little more detail. For beginning, I dont know what a UserControl
means. (Sorry, just started on c#). Would really appreciate step wise
explanation or if you can direct me where I can get the details as I
could not find anything either on the net or the vs2008 help.
Thanks
Nitin
Sep 18 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: imassadpk | last post by:
Hi all, Apprecite your help in resolving this tricky issue... I am trying implementing Recurrsive TreeView in MS. Access 2003 ADP project. So far, no luck :( The Problem: This sample...
2
by: Janus | last post by:
Hello. I need a little advice for populating the treeview control. I dont want my application to hang while populating the treeview, there is a lot of data what's the best approach? Maybe...
0
by: N-Mayne | last post by:
Hi i was wondering if anyone knew how to Populating a TreeView control with the contents of a class and varibles etc, like netbean does but in C#. Thanks Nick Posted Via Usenet.com Premium...
4
by: IndeX? | last post by:
Hello, I'm parsing from an xml file (using DOM), so that i can place certain nodes in a TreeView. Xml file looks like this: <questions> <question ID="Question 01" Text="Some Text"> <answers>...
1
by: naijacoder naijacoder | last post by:
Hi Guys, I have an application below that is treeview menu populated from the database which works with asp.net webmatrix.But when i put it into code behind in Visual Studio.Net it gives the...
2
by: Mike | last post by:
Hi all, I have a dataset that contains following records: id ref_id level -------------------------------------- A - 0 A1 A 1 A2 ...
0
by: Erland | last post by:
Hello all, I have just installed visual studio .net 2005 and started developing programs in asp.net 2.0. I have a scenerio where I have to populate treeview child nodes based on the entries...
0
by: drop | last post by:
Hi, I'm currently working with the Treeview control in ASP .Net 2.0. The tree is filled dynamically based on data contained in a MySQL Database. Here is the exact behavior I want : 1 - User...
0
by: hardieca | last post by:
Hi, I have created a treeview bound to a sitemap provider. I have put it into a user control (the control will be used for similar, but not always identical, functionality). The treeview...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.