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

Drop position line stays after canceling D&D

1 Answer 20 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Marcin
Top achievements
Rank 1
Marcin asked on 26 Sep 2014, 11:39 AM
Hi,

After migrating to latest Telerik silverlight controls, we encounter an D&D behavior, that was working correctly in previous version of D&D (legacy mode).

In some scenarios a D&D operation is ended by setting e.Handled to true in PreviewDrop event. In such cases there is a modal dialog opened, so that the user can enter details for the D&D operation, and after accepting it a dragged node is placed in correct position.

In this situation, the drop position line stays in the tree.

Is there any way to remove it from the tree?

Telerik version: 2014.2.729.1050

Best regards
Marcin Danek

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 29 Sep 2014, 08:27 AM
Hi Marcin,

The described behavior is caused by the fact that the internal drag drop logic of the tree updates the preview line in its Drop event handler. When you handle the PreviewDrop event, the logic for removing the line is not executed.

In order to hide the line you can use the RadTreeView's UpdateDropPreviewLine() method.
private void OnPreviewDrop(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
    ...
    e.Handled = true;
    this.tree.UpdateDropPreviewLine(null, DropPosition.Undefined);
}

Please let me know if you need any further assistance.

Regards,
Martin
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TreeView
Asked by
Marcin
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or