Hi,
I try to get even for dragdrop once node move to another location, i used following code to get event, but not success, here i attach code. i make true for RadTreeView1.AllowDragDrop = True and RadTreeView1.AllowDrop = True
I try to get even for dragdrop once node move to another location, i used following code to get event, but not success, here i attach code. i make true for RadTreeView1.AllowDragDrop = True and RadTreeView1.AllowDrop = True
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load RadTreeView1.AllowDragDrop = True RadTreeView1.AllowDrop = True ' Add event handlers for drag and drop events AddHandler RadTreeView1.DragEnter, AddressOf RadTreeView1_DragEnter AddHandler RadTreeView1.DragDrop, AddressOf RadTreeView1_DragDrop End Sub Private Sub RadTreeView1_DragEnter(sender As Object, e As DragEventArgs) Handles RadTreeView1.DragEnter ' Check if the data being dragged is a RadTreeNode If e.Data.GetDataPresent(GetType(RadTreeNode)) Then e.Effect = DragDropEffects.Move Else e.Effect = DragDropEffects.None End If End Sub Private Sub RadTreeView1_DragDrop(sender As Object, e As DragEventArgs) Handles RadTreeView1.DragDrop ' Check if the data being dragged is a RadTreeNode If e.Data.GetDataPresent(GetType(RadTreeNode)) Then ' Get the dragged node Dim draggedNode As RadTreeNode = CType(e.Data.GetData(GetType(RadTreeNode)), RadTreeNode) ' Get the target node Dim targetNode As RadTreeNode = RadTreeView1.GetNodeAt(RadTreeView1.PointToClient(New Point(e.X, e.Y))) ' Get the full path of the dragged node Dim draggedNodePath As String = draggedNode.FullPath ' Get the full path of the target node Dim targetNodePath As String = targetNode.FullPath ' Do something with the full paths MessageBox.Show("Dragged Node Path: " & draggedNodePath & vbCrLf & "Target Node Path: " & targetNodePath) End If End Sub
Please advice me what i make mistake ? i try to get source and destination node after drag and drop nodes
Please asap.
Regards
Aravind