We were trying to implement different server template test cases using various combinations. The problem seems to be in the Clear() method that does not remove Control object of treenode from the container collection of its parent.
So we have a new testing build here, and here's a special download link for you:
http://download.9rays.net/treeview_asp.net_2/flytreeview_asp2_test.zip
We will able to publish it after some necessary steps, but please try it for your case first. So we can make sure it finally solves the issue.
Regarding 'Loading' text message. We've not succeeded to reproduce this problem here. Hope to get to it soon.
Also I can say some words regarding implementations of on demand population.
There two ways. It seems that you're using the PopulateNodes event handler:
protected void Page_Load(object sender, EventArgs e)
{
flyTreeView.Nodes[0].ChildNodes.Clear();
flyTreeView.Nodes[0].PopulateNodesOnDemand = true;
}
protected void flyTreeView_PopulateNodes(object sender, NineRays.WebControls.FlyTreeNodeEventArgs e)
{
FlyTreeNode ftn = new FlyTreeNode(\"Text\", \"Value2\");
ftn.NodeTypeID = \"interest\";
e.Node.ChildNodes.Add(ftn);
}
But it your case should be better not to handle the PopulateNodes event, but NodeExpandedChanged event instead:
protected void flyTreeView_NodeExpandedChanged(object sender, NineRays.WebControls.FlyTreeNodePropertyChangedEventArgs e)
{
if (e.Node.Expanded == true && e.Node == flyTreeView.Nodes[0])
{
e.Node.ChildNodes.Clear();
FlyTreeNode ftn = new FlyTreeNode(\"Text\", \"Value1\");
ftn.NodeTypeID = \"interest\";
e.Node.ChildNodes.Add(ftn);
}
}
Note: In both cases the PopulateNodesOnDemand is set to true, and the second case does not use Page_Load to clear its nodes.
The second implementation is more performance effective way for the case.