Right click shall select a node

2 posts, 0 answers
  1. Tzach Kaufmann
    Tzach Kaufmann avatar
    95 posts
    Member since:
    Aug 2008

    Posted 01 Sep 2008 Link to this post

    Hello Telerik support,

    I would like to make a node selected if I right click on top of it.
    Current behaviour requires me to first left click a node (select it) and only then right click works correctly.

    Regards,
    Tzach.
  2. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 03 Sep 2008 Link to this post

    Hello Tzach Kaufmann,

    You can do that by handling the NodeMouseDown event of RadTreeView:
     
        void radTreeView1_NodeMouseDown(object sender, RadTreeViewMouseEventArgs e) 
            { 
                if (e.OriginalEventArgs.Button == MouseButtons.Right) 
                { 
                    this.radTreeView1.SelectedNode = e.Node; 
                } 
            } 

    However, if you want this because of the context menu, you can also take a look at the ContextMenuShowing event of RadTreeView.
     

    Best wishes,
    Jordan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top