Select or Click event for a TreeView Child node
I have a treeview control in asp.net. It has multiple parents nodes and under each parent node, there are multiple child nodes. When I select a parent node (click on it) a TreeView event called TreeView1_SelectedNodeChanged is trigge开发者_如何学JAVAred. I can write custom code based on requirements. What I am looking for is "On Select" or "On Click" for a Child node. I do not see any events for a child tree node. How do I do this? Although I can write code for Parent node click, I dont see anything for child node click or select.
When you add the child node you can set the SelectAction:
child.SelectAction = TreeNodeSelectAction.Select
That should do it.
精彩评论