ContextMenu

3 posts, 0 answers
  1. Filipe Rodrigues
    Filipe Rodrigues avatar
    21 posts
    Member since:
    Oct 2006

    Posted 17 May 2007 Link to this post

    Hi,
    I have a radtreeview and I need to have a contextmenu in the nodes...I'm using a RadDropDownMenu and in the radtreeview.radcontext menu I choosed the RadDropDownMenu name. But the treeview doesn't show any context menu. What i'm doing wrong?
    Thanks.
  2. Jason
    Jason  avatar
    2 posts
    Member since:
    May 2007

    Posted 17 May 2007 Link to this post

    There is an alternative way to achieve your task.
    1) Assign a context menu to your treeView
    this.radTreeView1.RadContextMenu = this.radDropDownMenu1; 
    2) Handle TreeView's MouseDown event
     void radTreeView1_MouseDown(object sender, MouseEventArgs e) 
     { 
         if (e.Button == MouseButtons.Right) 
         { 
             this.radDropDownMenu1.Show(); 
             this.radDropDownMenu1.Location = Cursor.Position; 
         } 


  3. UI for WinForms is Visual Studio 2017 Ready
  4. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 18 May 2007 Link to this post

    Hello Filipe,

    If you want to have a context menu for a particular node, just set the node's ContextMenu property to a RadDropDownMenu instance like:
     
    radTreeNode1.ContextMenu = this.radDropDownMenu1; 

    If you have any other questions we'll be happy to help.

    Regards,
    Jordan
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top