Selecting after drag/drop

2 posts, 0 answers
  1. Derek
    Derek avatar
    12 posts
    Member since:
    Mar 2008

    Posted 31 Oct 2008 Link to this post

    This is probably a dumb question but I can't seem to figure it out.  How can I select the node that just got dropped somewhere?  I know of the .selected property but I am not sure how to reference it.  Here is my drag & drop code:

    Private Shared Sub PerformDragAndDrop(ByVal dropPosition As RadTreeViewDropPosition, ByVal sourceNode As RadTreeNode, ByVal destNode As RadTreeNode) 
            If (sourceNode.Equals(destNode) OrElse sourceNode.IsAncestorOf(destNode)) Then 
            End If 
            Select Case (dropPosition) 
                Case RadTreeViewDropPosition.Over 
                    ' child 
                    If Not sourceNode.IsAncestorOf(destNode) Then 
                    End If 
                Case RadTreeViewDropPosition.Above 
                    ' sibling - above                     
                Case RadTreeViewDropPosition.Below 
                    ' sibling - below 
            End Select 
        End Sub 

  2. Yana
    Yana avatar
    4806 posts

    Posted 03 Nov 2008 Link to this post

    Hi Derek,

    I suggest you use the following code line right after Select Case statement:

    sourceNode.Selected = true 

    Kind regards,
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top