RadContextMenu

2 posts, 0 answers
  1. Cc
    Cc avatar
    1 posts
    Member since:
    Jul 2012

    Posted 07 Aug 2012 Link to this post

    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
  2. Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 08 Aug 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top