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

Constricting selection to resrective nodes alone.

Thread ID:

Created:

Updated:

Platform:

Replies:

41606 Mar 7,2006 06:15 AM UTC Mar 27,2006 09:16 AM UTC WinForms 2
loading
Tags: Tools
Administrator [Syncfusion]
Asked On March 7, 2006 06:15 AM UTC

Hi, When I click along the line of the node, first selected nodes are getting selected again and again. I used the pointToClient method. I am not able to attach my sample. Please help me to select the respective nodes alone when I click along the line of node. Thanks, Regards, Sam

Deepa TS [Syncfusion]
Replied On March 7, 2006 10:19 AM UTC

Hi Sam, When along the line of the node is clicked, the respective nodes can be selected either using PointToClient method by handling MouseDown Event or by using GetNodeAtPoint in the treeViewAdv click Event handler. Using PointToClient Method: private void treeViewAdv1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e) { //Getting the mouse clicked point Point p = this.treeViewAdv1.PointToClient(Control.MousePosition); //Getting the node at the click point TreeNodeAdv node = this.treeViewAdv1.PointToNode(p); // set the newly selected node this.treeViewAdv1.SelectedNode = node; } Using GetNodeAtPoint Method: private void treeViewAdv1_Click(object sender, System.EventArgs e) { this.treeViewAdv1.SelectedNode=this.treeViewAdv1.GetNodeAtPoint(this.treeViewAdv1.PointToClient(Cursor.Position)); } Please take a look at the attached sample and let me know if this helps you. Thanks for your continued interest in Syncfusion products. Regards, Deepa.T.S

LineOfNode.zip

Administrator [Syncfusion]
Replied On March 27, 2006 09:16 AM UTC

Thats good!!

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.

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

;