Tree structure from table

Now I know of several ways of creating a table that could represent a table. My problem is how to get that data out of the table into a control (the data binding process).

I need to be able to show the whole tree, collapse branches, select branches, drag'n'drop branches... Oh yes and it is not like a treeview but more like a treelist, that will show all data columns of the table.

I would like to implement this through a ASP.NET page. Can use C# or VB.NET but other platforms are welcome too.

Not looking for a detailed solution (although I will accept it :) ) but some hints in the right direction would be great.

Who is Participating?

One more point ... I too was using the MS IEWebControls.exe mentioned earlier when I finally got the code in the above post working. After a lot of useless effort, I eventually decided the tree control in MS IEWebControls.exe did not have the flexability and robustness I needed. (Primarily because, like you, I needed a "simple" way to add and delete nodes on-the-fly)

Eventually I ended up purchasing the Infragistics NetAdvantage products. I now use their WinTree and WebNavigator tree in my applications and I've been very pleased.

"Now I know of several ways of creating a table that could represent a table". I ment "could represent a TREE" of course.
And I forgot to mention that I need to be able to change, insert and delete data rows in, into and from the tree.

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

download MS IEWebControls.exe,
Install it,
fix couple bugs related to tree node expanding and persistance support on the server side by overloading of its classes TreeView and TreeNode, these bugs are not too complex, but I don't have code nigh at hand,
create basic aspx file that selects top level nodes and fullfills them with data:
DataReader r;
TreeNode item;
...
doIt = r.Read();
while(doIt)
{
item = new TreeNode();

Alright, thanks for all the input so far.
The solution that comes closest to what I need, was posted by volking

volking:

I looked at the solution from Infragistics NetAdvantage you recommened (downloaded the trial version). I have not done very much with it but looked at some of their help files and examples. All hirachical grids are based on relations between different tables.
Have you implemented a hirachical tree with their DataGrid? I was wondering, how I would have to bind the individual layers of the tree to each other?

Yes, I've used the hierarchial metaphor with the datagrid ... simply put .... the learning curve was VERY PAINFUL (at least it was for me). The hierarchial metaphor's primary characteristic is STRONGLY TYPED DATASETS. When I began using the Infragistic datagrid, I knew nothing about Strongly Typed Datasets. However, once mastered, it is an extremely powerful solution. As I remember, there's at least one tutorial which walks through the process. Do the tutorial concentrating on each step and figure out what's "really" happening with special focus on the features of Strongly Typed Datasets and the way a relationship can be established between datasets.

In the end, I found the learning curve worth the effort. Good luck ...

where parent indicates the parent node and idx indicates the position within the local branch. A reference to first child and next sibling are not necessary for me at this moment. (The real table has actually way more data columns)

I read each level of the tree beginning from the top layer (parent = 0) and then using the returned data to filter all the children of the next one. (SELECT * FROM level2 WHERE (level2.parent IN level1.id) ORDER BY (level2.parent,idx))
All results are inserted as a table into a DataSet and linked through relations.

From there on it is just a question of which control to use. Since no hierarchical grid is included in the standard MS controls either I will have to write one myself or I just go with an already available one (like Infragistics as recommended by volking)

volking:
Strongly typed DataSet are very useful for this implementation but they are not necessary. I managed to bind to the data hierarchically without it and it worked fine, but of course what not as flexible as I wanted it to be. Thanks for all the help