I am using a TreeView control to display some hierarchical data. I want the TreeView to populate its nodes dynamically. I was hoping to achieve this using the TreeNodeExpanded event. Basically, when a node is expanded, the system will fetch the child rows, add them to the hierarchical datasource, and then rebind the data. The hierarchical datasource will be persisted in session state. The problem I am having is, no matter which row I expand, the TreeNodeEventArgs.Node is always the root node. I need a way to figure out which node was expanded. Here is my code:
Can anyone tell me how to determine which node was expanded?
Thanks
Kevin Davie
Consultant
Sogeti USA
Code:
protected void tv_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
{
// No matter what this node is always the root???
TreeNode node = e.Node;
}
Can anyone tell me how to determine which node was expanded?
Thanks
Kevin Davie
Consultant
Sogeti USA