Right click shall select a node

2 posts, 0 answers
  1. Covertix
    Covertix avatar
    96 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.

  2. Jordan
    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,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top