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

Drag and drop

7 Answers 237 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Max
Top achievements
Rank 1
Max asked on 13 Dec 2010, 06:04 PM
Hello,
I need to implement a drag and drop to reorder rows in a RadTreeListView, and to drop items from RadTreeView to the RadTreeListView control.
Do you have some example of this and also example on how to build the dragged tooltip.

Thank you

7 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 15 Dec 2010, 02:10 PM
Hi Max,

Have you checked out this drag and drop demo? It demonstrates how such functionality can be implemented.

Greetings,
Milan
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Max
Top achievements
Rank 1
answered on 15 Dec 2010, 04:55 PM
Hey.
Thank you for the reply. I saw this and few other examples - they are all implemented in very different code and none  is for the RadTreeListView control.
Trying to use them on the control didn't go very well and had problems.
I found this example and customized it to work with the RadTreeListView control but I have no idea whether the implemintation is best practice.
Can you please see the implementation?
Thanks
The download link:
http://rapidshare.com/files/437096855/158684_dragdrop-reorder-grid_v2.zip
0
Pavel Pavlov
Telerik team
answered on 21 Dec 2010, 12:42 PM
Hi Max,

I am attaching a small sample app which demonstrates the lighter approach to drag and drop  items in RadTreeListView. 

Kind regards,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Max
Top achievements
Rank 1
answered on 23 Dec 2010, 06:06 PM
Thank you.
I adapted the prev sample to the control and now I have few problems, I'm a attaching link to the solution.
I implemented the drag and drop on the right grid.

http://rapidshare.com/files/438910198/158684_dragdrop-reorder-grid_v4.rar

1. Once you drag and place the mouse on the line between items it starts blinking in a loop.
2. Once you set : 
RadDragAndDropManager.EnableNativeDrag = true;
The tooltip location is wrong.
3. Once you change the tabs few times - the drag and drop stops firing events and working in general.

Please reviews this problems.
Thank you
0
Pavel Pavlov
Telerik team
answered on 03 Jan 2011, 11:29 AM
Hello Max,
Thank you for reporting these issues ! I was able to clearly reproduce issues 1 and 3 with your sample project.
We are already working on fixing this.

Regarding Issue #2 ( the wrong location of the tooltip ) - I am not sure I could reproduce it.

One more time thank you for your collaboration on this one ! I am updating your Telerik points.

All the best,
Pavel Pavlov
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Max
Top achievements
Rank 1
answered on 03 Jan 2011, 04:22 PM
Hello,
First of all thanks for the reply.
Secondly, to reproduce the second issue you need to find the line in code where II do this command:  RadDragAndDropManager.EnableNativeDrag = true;
If it is set to true, the preview of the dragged item is not moving correctly. just try to move the dragged item around the screen. If I set it to false the preview of the dragged item moves as expected.

Thanks
0
Tsvyatko
Telerik team
answered on 06 Jan 2011, 05:31 PM
Hi Max,

In order to use RadDragAndDropManager.EnableNativeDrag you need to set it before setting allowdrag/drop properties or event handlers. Best way to it is in the App constructor. Let me know if this helps.

All the best,
Tsvyatko
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
TreeListView
Asked by
Max
Top achievements
Rank 1
Answers by
Milan
Telerik team
Max
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Tsvyatko
Telerik team
Share this question
or