Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > Right click shall select a node

Not answered Right click shall select a node

Feed from this thread
  • Tzach Kaufmann avatar

    Posted on Sep 1, 2008 (permalink)

    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.

    Reply

  • Jordan Jordan admin's avatar

    Posted on Sep 3, 2008 (permalink)

    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.

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Treeview > Right click shall select a node
Related resources for "Right click shall select a node"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]