I want to create an ASP.NET MVC 5 application that uses jsTree. I am using ASP.NET AJAX to dynamically load a page during runtime. Where can I initialize jsTree on the dynamically loaded partial view?
When I start the web application everything is ok. I see the tree like this:
But now I click on 'Change Tree View' and a partial view is loaded via an Ajax.ActionLink. Now the tree will not be rendered as a TreeView but only as a normal list:
You can initialize the tree like this:
$('#treeView').jstree();
How can I initialize the TreeView for the partial view that is dynamically loaded? I tried the OnComplete callback function of the Action Link but that did not work.
The page on which I want to use the tree view is dynamically loaded via Ajax. Is something missing?
You can find more code on Stackoverflow:
Greetings
Alexander