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