(system: Silverlight 2 with Telerik 2009.1.526.1020)
Thanks
James
5 Answers, 1 is accepted
In order to accomplish the desired functionality you have to use MouseLeftButtonUp event.
Please find attached a sample project that shows how to use MouseLeftButtonUp event with RadTreeView.
Kind regards,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
thanks
Please find attached a sample project that shows how to use MouseLeftButtonUp event of RadTreeViewItem.
As you can see in the project MouseLeftButtonUp is working properly as expected.
I hope that this answers your question.
All the best,
Boryana
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
From this sample, I wrote the following:
Private Sub MenuTreeView_MouseLeftButtonUp(sender As System.Object, e As System.Windows.Input.MouseButtonEventArgs)
Dim treeview As Telerik.Windows.Controls.RadTreeView = TryCast(sender,Telerik.Windows.Controls.RadTreeView)
Dim HeaderOfClickedItem As String
HeaderOfClickedItem = treeview.SelectedItem.ToString
MessageBox.Show(" we clicked on ... " + HeaderOfClickedItem)
End Sub
This enables me to acces the Header of the ClickedItem. However, I need to access for instance the TAG attribute in doing something like
TAGOfClickedItem = treeview.SelectedItem.TAG
howewer only the header is available with the .tostring converter
Need help to find a way to do it
The SelectedItem property returns object. Since the RadTreeView is not bound , you need to cast it to a RadTreeViewItem like so:
Dim
item
As
Telerik.Windows.Controls.RadTreeViewItem = TryCast(
Me
.treeView.SelectedItem, Telerik.Windows.Controls.RadTreeViewItem)
Dim
tag
As
Object
= item.Tag
Regards,
Petar Mladenov
the Telerik team