We currently have your grid control and love it. We now have a need for a treeview control that is less FLAKEY then microsofts. So we dowloaded yours today for evaluation purposes before we buy and had a question about it. If you run my sample and when it comes up if you double click the AGENCY parent and then double click the remit rate child under it you will notice it bring up a blank form. then click the "X" on that form to close it. now back on your tree view this is where our problem is. if u then click twice very fast on the PLUS sign on the sub costs parent node( not the text it self but on the PLUS sign) you will notice that it again opens up the blank form again. so whats happening is after you clicked remit rate the first time and closed that form when u come back to form1 notice that remit rate is still highlighted in the tree. then by clicking the plus sign twice it acts like a double click and then opens the still highlighted remit rate form and it shouldnt. if you double click the parent for sub cost by actually clicking the text you will notice that it doesnt because then it highlights sub costs. so i got in contact with the microsoft people and you will notice some other code in my sample that we arent going to but i left in so you could see it. this is how the microsoft people said you should work with a treeview by getting the current mouse cursor position instead of doing it how we were. this works but my question to you is this....is this how you would recommend getting which child node is selected?????
ADAdministrator Syncfusion Team July 29, 2004 07:15 PM
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
'' set the newly selected node
Me.TreeView1.SelectedNode = node
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.