How do you store and retrieve a hierachy
Hello,
I feel like an idiot because I don't know how to do this in a clean, slick way. If you can help, I would really appreciate it.
Problem: I have an hierarchy, similar to an organizational chart, of unknow depth,size, etc that I need to store in a collection of some sort that is to be loaded from a table. I have not created a format for the table yet, but it needs to be a table so it can be extensible. I also need to be able to programmatically examine each node.
I need a collection similar to the one used by a treeview. I'm not entirely sure how to create a class like that. Also, I can't figure out how to load the thing (even a treeview) for something that has a varying number or nodes and node depths.
After the thing is loaded, then how the heck do you chase down each branch? I would expect a For each next type recursive call.
If you can help with this I would really appreciate it!
Hubman
|