This is a migrated thread and some comments may be shown as answers.

Add Context Menu To TreeView

1 Answer 261 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 30 Apr 2011, 03:08 AM
I want to add a simple context menu to a treeview. So far I have

<telerik:RadTreeView ItemsSource="{Binding Customers}">
  
    <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu>
            <telerik:RadMenuItem Header="New" />
            <telerik:RadMenuItem Header="Open"/>
            <telerik:RadMenuItem Header="Delete" />
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
</telerik:RadTreeView>

When I run it and right-click the treeview, I get nothing. There is no data, so there are no nodes, but that shouldn't matter - how would the user selected the New option?


1 Answer, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 03 May 2011, 03:55 PM
Hi Kevin,

I am unable to reproduce your issue in our environment. What is the panel/control that holds your RadTreeView ? Could you please check out the attached project where a blank tree is placed in Grid (you can remove the Grid and test again) ? The RadContextMenu appears fine when right clicking with the mouse.
Please let us know if we are missing something.

Best wishes,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TreeView
Asked by
Kevin
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Share this question
or