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.
Unfortunately, activation email could not send to your email. Please try again.

TreeViewAdv Right Mouse Selection issue

Thread ID:

Created:

Updated:

Platform:

Replies:

21395 Nov 9,2004 08:25 AM Nov 11,2004 06:36 PM Windows Forms 1
loading
Tags: Tools
Administrator [Syncfusion]
Asked On November 9, 2004 08:25 AM

I am using the TreeViewAdv Demo and remove the context menu from the tree. When you right click on a node (hold the mouse down), the selection changed to the node that you clicked on. Releasing the mouse will put the selection back to the old node. Is there anyway to make the selection changed to the new node, like the original TreeViewAdv demo with the context menu inplace?

Administrator [Syncfusion]
Replied On November 11, 2004 06:36 PM

Hi Patrick, Please refer to the test sample attached here that shows how you could accomplish the above by handling the TreeViewAdv''s MouseDown event as shown below : private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { if (e.Button == MouseButtons.Right) { // get the point where the mouse was right clicked Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); // get the node at the right click point TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); // set the newly selected node this.treeViewAdv1.SelectedNode = node; } } Let me know if this works for you. Regards, Guru Patwal Syncfusion, Inc.

CONFIRMATION

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.

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.

;