We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SetXPContextMenu on TreeViewAdv, how to get the Node

Thread ID:





68193 Sep 11,2007 06:17 PM UTC Sep 13,2007 02:17 AM UTC WinForms 1
Tags: Tools
Oleg Ogurok
Asked On September 11, 2007 06:17 PM UTC

Hi there,

I have a TreeViewAdv and a context menu, which shows when I right-click a node on the tree.
this.popupMenusManager1.SetXPContextMenu(this.myTreeView, this.popupMenu1);

Then I subscribe to the click event of the BarItem that was left-clicked. In the event handler, how do I find the node in the tree that was Right-Clicked?


Rajagopal [Syncfusion]
Replied On September 13, 2007 02:17 AM UTC

Hi Oleg,

Thanks for your interest in Syncfusion Products.

Please try the code below in the MouseDown event of the TreeViewAdv to determine the node that was right clicked.

void treeViewAdv1_MouseDown(object sender, MouseEventArgs e)
if (e.Button == MouseButtons.Right)
Point p = this.treeViewAdv1.PointToClient(Control.MousePosition);
TreeNodeAdv node = this.treeViewAdv1.GetNodeAtPoint(p);



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon