Is there any way to disable this behavior? I am using the right-click to launch a context menu but do not want the selected node to change.
I'm not using multiselect.
7 Answers, 1 is accepted

Richard

When I right-click on any tree node, SelectedNodeChanged fires, followed by ContextMenuShowing. The only other events I'm using are some of the drag/drop events, none of which fire on right-click.
I'm using version 2010.1.10.504.
Thank you for writing.
At the moment RadTreeView changes its selection on mouse right-click and shows the context menu of the selected node. This behavior is not quite right and our team would like to apologize for the caused inconvenience.
I would like to let you know that we decided to create a brand new RadTreeView control designed to replace and extend the functionality of its ancestor. It will introduce new features, greater flexibility, and better performance. For example, one exciting improvement of the new control will be virtualization, which will allow you to load a great number of nodes without any performance concerns. More importantly, it will address all issues introduced in the current RadTreeView including the one you are experiencing. This control is part of our road map and although we cannot guarantee it, we will do our best to introduce it in Q3 2010.
At the moment, the only workaround I can suggest is illustrated in the attached sample project. I hope you will find it useful.
Let me know if I can assist you further.
All the best,
Boryana
the Telerik team

Thank you for writing.
The latest version of our controls allows the implementation of the original scenario suggested in the forum thread. The attached sample project illustrates how to show a context menu for every right-clicked node without changing the selection. Please note that in order to show a context menu for a non-selected node, you will need to assign a custom menu. For further details please refer to the attached file.
Let me know if I can assist you further.
Boryana
the Telerik team

Thanks for writing back.
The ContextMenuOpening event will fire only for selected nodes. In this sense you will not be able to use this event for the context menu of the non-selected nodes. I would recommend creating a custom context menu in an extended RadTreeView class. This context menu will be shown for both selected and non-selected nodes. You will also be able to get the right-clicked node in the extended implementations.
Please refer to a modified version of the sample project. If you have additional questions, feel free to contact me.
Kind regards,
the Telerik team