Anybody know if you can populate one hierarchy level at a time using a Microsoft ASP.NET/MVC TreeView? In other words, I’d like to be able to only populate the top level at first, and when the user clicks on it, the next level is pulled from the database, and so on until the bottom most level is reached. I’d like to avoid loading up the entire tree into an object based model at once, if at all possible. This is a rather large database based tree, so I would need to do it a single level at a time.
I’d appreciate some example code or even just pointing me in the right direction. Thanks!
Take a look at some of the jQuery tree view implementations out there. Most of them can populate on demand using Ajax. e.g. http://www.jstree.com/