I have a ASP.NET TreeView control which I set to dynamically populate all children. I have the ExpandDepth set to 1 so that the root node and all its 1st level children are visible (expanded) on initial display. Everything works fine except the TreeView.SelecetdNodeStyle property. It seems that only the nodes that are initially loaded will have the SelectedNodeStyle applied. All the other dynamically populated children (from ExpandDepth 2 and below) does not have the style applied.
So when I click on one of the 2nd-level links, although the link gets executed, the node does not appear to be selected. ie. The selected-style is still shown on a previously selected root or 1st level node.
So how do I make the SelectedNodeStyle applied to all the rest of the nodes as well?
P.S. None of the links in the treeview does a post-back. All the links are simply based on TreeNode.NavigateUrl with the TreeNode.Target set to a different frame.
Thanks,
Lee