R
rolf.oltmans
Hello,
I need to populate a TreeView control from SortedList(Winforms
application). I've stored ID's as key and Nodes as value. A typical
TreeView in my case would like like
1 Goal
1.1 Task1
1.2Task2
1.2.1 Goal1
1.2.2 sample task
1.2.3 sample txt
1.3 sample txt
2 sample txt
2.1 sample txt
2.2 sample txt
2.3 sample txt
2.3.1 sample txt
2.3.2 sample txt
3 sample txt
4 sample txt
and so on.
Following values are stored as keys
1
1.1
1.2
1.2.1
1.2.2
1.2.3
1.3
2
2.1
2.2
2.3
2.3.1
2.3.2
3
4
So I've tried hard but couldn't come up with a solution that would
generate TreeView from values in SortedList. Please note that tree
should exactly look like the structure of Arraylist, based on ID's.
If you think that I am approaching this problem from the wrong side
then please let me know what is the standard way to populate treeview
control from datastructures like hash table and SortedList. I did
search a lot on this problem but being naive couldn't retreive
something substantial. Please pardon my ignorance and enlighten me on
this issue.
I will really appreciate any help.
I need to populate a TreeView control from SortedList(Winforms
application). I've stored ID's as key and Nodes as value. A typical
TreeView in my case would like like
1 Goal
1.1 Task1
1.2Task2
1.2.1 Goal1
1.2.2 sample task
1.2.3 sample txt
1.3 sample txt
2 sample txt
2.1 sample txt
2.2 sample txt
2.3 sample txt
2.3.1 sample txt
2.3.2 sample txt
3 sample txt
4 sample txt
and so on.
Following values are stored as keys
1
1.1
1.2
1.2.1
1.2.2
1.2.3
1.3
2
2.1
2.2
2.3
2.3.1
2.3.2
3
4
So I've tried hard but couldn't come up with a solution that would
generate TreeView from values in SortedList. Please note that tree
should exactly look like the structure of Arraylist, based on ID's.
If you think that I am approaching this problem from the wrong side
then please let me know what is the standard way to populate treeview
control from datastructures like hash table and SortedList. I did
search a lot on this problem but being naive couldn't retreive
something substantial. Please pardon my ignorance and enlighten me on
this issue.
I will really appreciate any help.