Hi Evgeny,
I downloaded the latest version from your site today and tried. Still the same error. What I am doing is the following:
FlyTreeNodeCollection nodes = MyTree.Nodes;
FlyTreeNodeCollection sn;
string[] values = PATH.Split('-');
string lastNode = values[values.Length - 1];
foreach (string s in values)
{
sn = nodes.FindByValue(s, true);
foreach (FlyTreeNode ftn in sn)
{
ftn.Expanded = true;
MyTree.PopulateExpandedNodes();
nodes = ftn.ChildNodes;
if (String.Equals(s, lastNode))
{
ftn.Selected = true;
}
}
}
MyTree.FocusNode = MyTree.SelectedNode;
This in my page_load method of my masterpage. On every navigateUrl, this code successfully expands my tree according to the PATH-variable, and selects the last node. However:
MyTree.FocusNode = MyTree.SelectedNode;
fails and throws a javascript error when the page is loaded, the tree expanded and my node selected. Everything else works fine.
Could you see any errors in my code or am I doing something else wrong? The funny thing is, that MyTree.SelectedNode is not null, it is actually a node. Yet still it cannot be \"focused\" according to the javascript error.
My tree is like this:
ID=\"MyTree\"
runat=\"server\"
ImageSet=\"MSDN\"
BarBackgroundImage=\"$bar_green\"
ContentClickCollapses=\"true\"
ContentClickExpands=\"true\"
DisplayBar=\"true\"
DrawLines=\"true\"
FadeEffect=\"true\"
ChildIndent=\"20\"
BarWidth=\"25\"
Padding=\"5px\"
BorderStyle=\"None\"
PathSeparator=\"-\"
CanBeSelected=\"true\"
OnPopulateNodes=\"MyTree_OnPopulateNodes\">
Thanks in advance!
BR