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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeViewAdv Right Mouse Selection issue

Thread ID:





21395 Nov 9,2004 01:25 PM UTC Nov 11,2004 11:36 PM UTC WinForms 1
Tags: Tools
Administrator [Syncfusion]
Asked On November 9, 2004 01:25 PM UTC

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 11:36 PM UTC

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.


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

Live Chat Icon For mobile
Live Chat Icon