Home - Forums-.NET - FlyTreeView (ASP.NET) - Do not cache nodes when loading on demand

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Do not cache nodes when loading on demand
Link Posted: 21-Sep-2006 01:07
[quote="EvgenyT"]I should post it here also.
Here's final solution code for the problem:

if(window.event.eventName == "ONBEFORECOLLAPSE")
{
    window.event.node.State = 3;
    window.event.node.ChildrenBuilt = false;
}


I wanted to retrieve nodes from serverside on each expand. I tried to run your solution but I get error "object required".

this is mine

function onNodeEventHandler(sender, node, eventType)
{
   if(window.event.eventName == "ONBEFORECOLLAPSE")
   {
       window.event.node.State = 3;
       window.event.node.ChildrenBuilt = false;
   }
}

eventName is not defined or null.
we need to run  this solution. please advice me.

thanks.
Link Posted: 21-Sep-2006 02:24
The solution was for FlyTreeView for ASP.NET 1.1 wich has different client-side model.

Here's the solution for FlyTreeView for ASP.NET 2.0:


function onNodeEventHandler(treeview, node, eventType){
    if (eventType == \"collapsed\") {
        var childNodes = node.getChildNodes();
        for(var i = 0; i < childNodes.length; i++){
            var curChild = childNodes[i];
            curChild.remove();
        }
    node.setPopulateNodesOnDemand(true);
  }    
}


And the hanlder for FlyTreeView tag:
OnNodeEventJavascript=\"onNodeEventHandler\"


P.S. The latest build of FlyTreeView for ASP.NET 2.0 required (build 145)
Link Posted: 21-Sep-2006 19:53
thanks. i installed last version and it is really working. this is excellent support.