Hi Phil,
Thanks for bringing this issue to our attention, and also for the sample application. This is indeed a shortcoming in our TreeViewAdv control, and I have notified the development team in this regard. We will try our very best to address this issue at the earliest.
For now, you could use the following workaround :
Handle the TreeViewAdv''s MouseDown event as shown below to get the node which has been clicked upon, and set it as the selected node.
Private Sub TreeView1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TreeView1.MouseDown
If e.Button = MouseButtons.Left Then
'' get the point where the mouse was right clicked
Dim p As Point = Me.TreeView1.PointToClient(Control.MousePosition)
'' get the node at the right click point
Dim node As Syncfusion.Windows.Forms.Tools.TreeNodeAdv = Me.TreeView1.PointToNode(p)
'' clear earlier selected nodes
Me.TreeView1.SelectedNodes.Clear()
'' set the newly selected node
Me.TreeView1.SelectedNode = node
End If
End Sub
I have modified your
earlier sample accordingly and have attached it here. Please refer to it and let me know if you need any other information. Thanks for choosing Syncfusion products.
Regards,
Guru Patwal
Syncfusion, Inc.