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

RadContextMenu

1 Answer 75 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Cc
Top achievements
Rank 1
Cc asked on 07 Aug 2012, 02:00 PM
hi,

why in my project TreeListView i can not use RadcontextMenu? I would like to add some menus when i right mouse click on the rows in the TreeListView. But if i defind the following in the xaml file,  It always said Type RadContextMenu is not defined?  what is the problem?

          <telerik:RadContextMenu.ContextMenu>
                <telerik:RadTreeListView.ContextMenu x:Name="GridContextMenu">
                    <telerik:RadContextMenu.Items>
                        <telerik:RadMenuItem Header="Add" />
                        <telerik:RadMenuItem Header="Edit" />
                        <telerik:RadMenuItem Header="Delete" />
                    </telerik:RadContextMenu.Items>
                </telerik:RadTreeListView.ContextMenu>
            </telerik:RadContextMenu.ContextMenu>

thanks,
Cui

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 08 Aug 2012, 02:29 PM
Hi,

You can use the following code to create the RadContextMenu:
<telerik:RadTreeListView x:Name="radTreeListView">
    <telerik:RadContextMenu.ContextMenu>
        <telerik:RadContextMenu>
            <telerik:RadMenuItem Header="Add"/>
            <telerik:RadMenuItem Header="Edit"/>
        </telerik:RadContextMenu>
    </telerik:RadContextMenu.ContextMenu>
</telerik:RadTreeListView>

Also you may check our online help here and the demos in which you may find a lot of useful information and sample code here (you`ll have to install a simple application to be able to check the demos).

Thank you for choosing RadControls. Don`t hesitate to contact us if you have any problems or questions!

Regards,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ContextMenu
Asked by
Cc
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or