The TreeView has an rclick event. If you're unsure of how to handle MDX events, read the FAQ in the help file. The documentation for the TreeView tells you how to get the branch that was right-clicked on.
Scoring disabled. You must be logged in to score posts.