I am using MVVM. I wanted to know how to get the Node when you do right click on the node to View Model. My selected node and where am doing the right click is different
3 Answers, 1 is accepted
0
Maya
Telerik team
answered on 25 Apr 2013, 08:05 PM
Hi Rajashree,
You need to handle MouseRightButtonDown event, find the element underneath and get its corresponding data item. It could be something like follows:
Is there any way that we will get the node without writing code-behind in View (MVVM). Passing this as event argument to some method in view model.
0
Maya
Telerik team
answered on 26 Apr 2013, 01:03 PM
Hi Rajashree,
if you want to keep your code-behind clean, you can either crate an attached behavior and handle the event there (just like in this demo) or work with the patter illustrated in this article (all you need to do in this case is to pass the arguments of the event).