views:

10

answers:

0

Well the title basically explains the problem pretty good, I have a hierarchy of n-level depth that I would like to display in a number or cascading dropdown lists. When making a choice in the first dropdown list all child nodes for that choice should be populated in another dropdown list next to the first, and for every choice in that second dropdown list all childs for that node should appear in the third dropdown list etc etc...

n levels of depth => n number of dropdown lists n number of drop down lists => dynamically created objects dynamically created objects => dynamically added event listeners for each dropdown list

problem. How to maintain state for the dynamically created objects? I've done some testing and I think I would need to do something like override the viewstate save and load event handlers....

Well basically it's a shitload of work that you get for free if using a TreeView (since it's only one object that we can statically declare and therefor won't have problem with multiple event handlers nor to maintain state), but I wonder if there is some other simpler solution if you really doesn't want to use TreeView nor doing all that work to make the dropdown lists to work as intended.