I have a table in my database which keeps track of a 3 level hierarchy. What is the best way to display and change/modify this hierarchy? Which asp.net control to use and how?
A:
I can give you some ideas from the little informations that I have.
First in the database, just use a field that point to the father of a line. Using this father ID you can make any simple tree.
The easiest way to modify it is just change this father and take care to not make any dead cycle loop.
Second way is to use jQuery and any Tree control, to modify the tree.
For example this http://www.jstree.com/
or this http://www.prodevtips.com/2010/03/07/jquery-drag-and-drop-to-sort-tree/
are very good jQuery javacript code to show and change the hierarchy.
Using any of this jQuery plugin you can render your tree, and after the modification to get the changes and saved back to your database.
Aristos
2010-10-24 20:37:25