Your documentation mentions being able to drag & drop between multiple treeviews.
Is there a way to achieve that in the current release? It seems like the drag operation is limited to inside the control's area. The dragged item will stops moving once the cursor gets out of the treeview's region.
Is there a property needed to activate that, or is this a limitation of the current release ?
5 Answers, 1 is accepted
this is a limitation that will we try to address in the next release.
Thanks for your interest on this. We are actually working on a drag/drop framework which will allow drag/drop from/to any element.
Sincerely yours,
Valentin.Stoychev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Can anyone update on whether the drag & drop across the treeviews is now possible or not?
Is there any direct property/method that can be used to achieve this or is the behavior customizable?
Please provide a sample if anyone has already worked on this.
-Mahima
Hello Mahima,
The RadTreeView has simple built-in DragDrop that works automatically. If you want to implement Drag-Drop between different controls (as in your case), you need to use the DragDropManager.
It uses extensively routed events and can be used with almost any control.
I created a sample solution where Drag & Drop between TreeViews is implemented.
The project also demosntrates TemplateSelectors and Binding, also DragDrop between DataGrid & tree view. These concepts are discussed here:
http://www.telerik.com/community/forums/silverlight/treeview/databind-from-wcf.aspx
and
http://www.telerik.com/community/forums/silverlight/drag-and-drop/drop-to-a-datagridrow.aspx
Also in the last thread I have attached a draft version of the DragDrop help which you can use.
Please, let me know if you need more help.
Regards,
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Is there a way to drag from one treeview to another and not remove the item from the source treeview (sort of like how microsoft does it with a "link" reference. I couldn't figure out how to prevent the source tree from removing the item. The end result should be both trees referencing the same object.
best,
-Mike Gold
Microsoft MVP
Just found the answer in this forum.
best,
-Mike
You can handle the PreviewDragEnded event, like so:
private
void
treeView_PreviewDragEnded(
object
sender, RadTreeViewDragEndedEventArgs e)
{
e.Handled =
true
;
}
This will make sure that the tree view does not modify its data source.
Kind regards,
Miroslav
the Telerik team