For what I'm doing it won't make a huge difference, but it would help to know in certain circumstances.
5 Answers, 1 is accepted
We will provide the original mouse arguments as a property of the RadTreeViewEventArgs, for all mouse events exposed on the treeview level (NodeMouseDown, NodeMouseUp, etc.). It will be available for Q2 release in September. If you have any other ideas on how to improve the treeview API, please share them with us.
Kind regards,
Dimitar Kapitanov
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Hello
I see the original mouse arguments on the RadTreeViewMouseEventArgs (with NodeMouseDown, NodeMouseUp events)
But I don't see the original mouse arguments on the RadTreeViewEventArgs of the NodeMouseClick Event ?
Am I missing something ?
How can I get the mouse button (left or right) on a nodeMouseClick event ?
Thanks
Pierre-Jean
Hello, Pierre-Jean,
Yes, you are right. Currently, the NodeMouseClick event does not offer the original mouse arguments as in NodeMouseDown and NodeMouseUp events. I found it a reasonable request this is why I have logged it in our feedback portal by creating a new public thread. You can track its progress, subscribe for status changes, and add your comments on the following link - feedback item.
I have also updated your Telerik Points for the report.
Currently, due to the specifics of the issue, you can use the NodeMouseDown and NodeMouseUp events.
Should you have other questions please let me know.
Regards,
Nadya
Progress Telerik
Hello Nadya
Thanks a lot for your message,
For various reasons I have to handle the nodemouseclick event, therefore I have solved the issue in saving the mousebutton clicked in the nodemousedown event and then use it in the nodemouseclick, as below.
This works fine for me
Thanks for updating my points
Best Regards
----------------------------------------------------------------------------------------------------------------------
Private MouseOriginalEventArgs As MouseButtons
Private Sub tvShow_NodeMouseClick(sender As Object, e As RadTreeViewEventArgs) Handles tvShow.NodeMouseClick
If MouseOriginalEventArgs = MouseButtons.Left Then cMain.LoadShowtvNode(e.Node)
End Sub
Private Sub tvShow_NodeMouseDown(sender As Object, e As RadTreeViewMouseEventArgs) Handles tvShow.NodeMouseDown
MouseOriginalEventArgs = e.OriginalEventArgs.Button
addCtxMenu(e.Node)
End Sub
Hello, Pierre-Jean,
I am glad that you managed to find a working solution for your scenario. Storing MouseOriginalEventArgs is also a possible approach. Thank you for sharing it.
I would like to note that the issue is in the development stage now (as you can see from the feedback item's status) so a fix will be introduced soon in one of our next LIB. Stay tuned!
Do not hesitate to contact me if you have other questions.
Regards,
Nadya
Progress Telerik