Hi!
I am experiencing a minor frustration with an otherwise perfect component.
I am currently using the TreeView component to develop a \"file manager\" application. Each level of the file system is populated when needed using the OnPopulateNodes event.
As the default appearence i use the Windows XP template and on top of that i have two NodeTypes (one for folders and one for files) that ONLY changes the icon of the defaultStyle.
Now to the problem:
When the nodes get loaded they still have the default icon from the windows XP template. If i select the node nothing happends but when the node looses selection the icon is displayed correctly (from defaultStyle property of the NodeType). If i then select it again it reverts to windows xp icon and so on...
Any idea why this is? Or how i can fix it?
Here is the PopulateNodes method:
(I?ve removed some code for clarity)
protected void flyTreeView_PopulateNodes(object sender, NineRays.WebControls.FlyTreeNodeEventArgs e) {
// Get all sub folders
foreach (WebSite.FsFolders folder in folderTable) {
// Create then node
FlyTreeNode folderNode = new FlyTreeNode(folder.Name, folder.ID.ToString());
folderNode.NodeTypeID = \"ntFolder\";
// Does the folder have children?
folderNode.PopulateNodesOnDemand = folderProvider.HasChildren(folder.ID);
// Add the node
e.Node.ChildNodes.Add(folderNode);
}
}
}
And this is the tree declaration:
Thanks in advance
Bjorn Dahlin