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

Problems migrating to DragDropManager with TreeView

1 Answer 51 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 14 Apr 2014, 01:12 PM
Hi,

I've written a custom control containing a RadTreeView to encapsulate the logic to handle drag&drop because I need this in multiple places in my application. This control used the RadDragAndDropManager. My current task is to migrate to DragDropManager and started this by disable the old drag&drop handlers and set the drag drop execution mode:

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            if (_treeView != null)
            {
              ...
            }

            _treeView = GetTemplateChild(TreeViewName) as RadTreeView;
            if (_treeView != null)
            {
                TreeViewSettings.SetDragDropExecutionMode(_treeView, TreeViewDragDropExecutionMode.New);
                ...
            }
        }

So far so good. This compiles without errors but soon I start to drag I get the following error from the browser:

Line: 57
Error: Unhandled Error in Silverlight Application 
Code: 2512    
Category: ParserError       
Message: Failed to create a 'System.Windows.Media.Brush' from the text 'Null}'.     
File:      
Line: 6534     
Position: 48     

I have no cue that could be the cause of the problem. The VS debugger does NOT stop or throws any exception. If I use the old drag&drop execution mode I have no problems. ​I use 2013.3.1104.1050 of the Telerik assemblies.
Must I handle all drag&drop events to make this work or is this a problem in the Telerik controls?

Thanks for the support!

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 17 Apr 2014, 11:26 AM
Hello Ralf,

Thank you for contacting us on that matter. Please note that I cannot be sure about your particular implementation. Hence, I am unable to reproduce and test the reported behaviour on our side.

However, you may find helpful our DragDropManager Migration article. Also, with the new drag drop logic we exposed the TreeViewDragDropOptions object. It exposes properties that control the visual feedback when you perform drag&drop operations in the RadTreeView control. You can find more information in our How To -> Drag and Drop section of our tree view documentation.

If these articles are not helpful in your particular case. I will need you to provide me with additional information about your implementation. I need to reproduce the issue on our side in order to investigate the reasons behind it and suggest an approach.

Thank you for understanding.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
DragAndDrop
Asked by
Ralf
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or