This is a migrated thread and some comments may be shown as answers.

Problems with differences between TreeView and TreeListView

1 Answer 196 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
M STOLYAR
Top achievements
Rank 1
M STOLYAR asked on 23 May 2012, 06:44 AM
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?

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 25 May 2012, 12:35 PM
Hi,

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!  

Greetings,
Nik
the Telerik team

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

Tags
TreeListView
Asked by
M STOLYAR
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or