Hi,
We have a problem with getting the SelectedItem of the RadTreeView
when we right clicking it to show it's ContextMenu.
the solutions that are presented in the posts are both written in the code behind
and involve an explicit casting to a RadTreeView / RadTreeViewItem in order to
get the SelectedItem.
We are looking for a solution where there is no need to use this code in the code-behind:
http://www.telerik.com/community/forums/wpf/treeview/right-click-to-select-item.aspx
as in Syncfusion there is a property: IsSelectOnRightMouseClick that does that.
We are also looking into avoiding mentioning 3rd-party controls in our ViewModel,
in our Syncfusion mockup we are able to produce this handler:
void OurTree_MouseRightButtonDown(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
{
SelectedItem = e.NewValue as OurSpecificObject;
}
is it possible to do this with telerik?
thank you.
We have a problem with getting the SelectedItem of the RadTreeView
when we right clicking it to show it's ContextMenu.
the solutions that are presented in the posts are both written in the code behind
and involve an explicit casting to a RadTreeView / RadTreeViewItem in order to
get the SelectedItem.
We are looking for a solution where there is no need to use this code in the code-behind:
http://www.telerik.com/community/forums/wpf/treeview/right-click-to-select-item.aspx
as in Syncfusion there is a property: IsSelectOnRightMouseClick that does that.
We are also looking into avoiding mentioning 3rd-party controls in our ViewModel,
in our Syncfusion mockup we are able to produce this handler:
void OurTree_MouseRightButtonDown(object sender, System.Windows.RoutedPropertyChangedEventArgs<object> e)
{
SelectedItem = e.NewValue as OurSpecificObject;
}
is it possible to do this with telerik?
thank you.