I've implemented the JQuery Async Treeview (in APS.NET MVC2) and it works fine, but the problem is when the user adds new nodes to a tree (via another interface), there is no way to reload the tree and reflect the new tree structure.
The only way to see the changes in the tree is to shut down the browser (IE8). Trying .empty() on the tree on every reload doesnt do anything :(
Heres the page source:
<script src="/Scripts/jquery.treeview.js" type="text/javascript"></script>
<script src="/Scripts/jquery.treeview.async.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#organizationStructure').empty();
$('#organizationStructure').treeview({
url: '/OrganizationStructure/Browse/',
collapsed: true,
animated: "medium",
control: "#sidetreecontrol"
});
});
</script>
<h2><%= Html.Encode(ViewData["Message"]) %></h2>
<p></p>
<div id="sidetreecontrol"> <a href="?#">Collapse All</a> | <a href="?#">Expand All</a> </div>
<p></p>
<ul id="organizationStructure" class="filetree"></ul>
the URL /OrganizationStructure/Browse is only called when the tree is being built the first time..i cant for the life of me get it to rebuild even when the browsers "Refresh/Reload" button is clicked.
Any help would be GREATLY appreciated. Thanks