Oke .. this works now, but I got another question:
After modifying an object, I want to reload the whole tree and expand it as the path of the modified object defines. I implemented an own method which does not work now (with loading the nodes on demand) anymore.
What should I make different or does a method already exist, which expands the tree by a given path?
Here is the code of the method:
protected void ExpandTree(FlyTreeView tree, string[] path)
{
FlyTreeNodeCollection collection;
FlyTreeNode node = new FlyTreeNode();
for (int i = 0; i < path.Length; i++)
{
if (i == 0)
{
collection = tree.Nodes.FindByValue(path[0], false);
if(collection.Count <= 0)
break;
node = collection[0];
node.Expanded = true;
tree.
}
else
{
collection = node.ChildNodes.FindByValue(path[i], false);
if (collection.Count <= 0)
break;
node = collection[0];
node.Expanded = true;
}
}
}