Problems with differences between TreeView and TreeListView

2 posts, 0 answers
    M STOLYAR avatar
    12 posts
    Member since:
    Dec 2010

    Posted 23 May 2012 Link to this post

    I have code which handling tree of data elements in TreeView and I wanted to rewrite it for TreeListView.
    I've stumbled upon lack of DragEnded event and DropPosition in the args of PreviewDragEnded event is not set correctly.
    When I'm trying to drag item before (after) some element, DropPosition is set to Inside and this is not right.

    How can be handled these inconsistencies?
  2. Nick
    Nick avatar
    593 posts

    Posted 25 May 2012 Link to this post


    The DropPosition is determined from the relative mouse position during the drag operation, which is sometimes not always entirely correct. This is one of the reasons why we started implementing a new drag and drop mechanism (I have already mentioned it in your other thread). 
    You can use its GetPosition method, in the DragEventArgs in i. e. the DragOver event, to get a correct relative mouse position and determine the exact drop position of the dragged item.

    Hope this helps!  

    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
Back to Top