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

Drag n Drop between Rad Treeview and Rad ListBox

7 Answers 193 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Mahitha Madala
Top achievements
Rank 1
Mahitha Madala asked on 26 Sep 2009, 09:00 AM
hi,

I am trying to drag items of a Rad Listbox into a Rad TreeView.

I have found how to do a drag and drop between two Rad ListBoxes. In the same way i have tried for the above senario.

Please can anyone help me how to implement Drag and drop between Rad TreeView and Rad ListBox.

Thank you.

regards,
Mahitha Madala

7 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 01 Oct 2009, 07:21 AM
Hi Mahitha Madala,

Thank you for the question. Currently our controls do not fully support automatic Drag & Drop between each other, however it is trivial to do so. You need to use the standard windows forms drag and drop mechanism combined with a method that can be accessed through a RadElement instance. All RadElements have an ElementTree property which has a GetElementAtPoint() method. RadTreeView has a TreeViewElement property and RadListBox has a ListBoxElement property. They are of type RadElement and therefore ElementTree.GetElementAt() method can be accessed. This method will help you determine what you have clicked when you start dragging and what you are dropping on. Write again if you have other questions.

Best wishes,
Victor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Anthony Pieper
Top achievements
Rank 1
answered on 12 Jan 2010, 03:43 PM
Is there a way you can post the solution to this in a project file for C# and zip it up?

Thank you
0
Nikolay
Telerik team
answered on 14 Jan 2010, 09:57 AM
Hi Anthony Pieper,

We do not have a ready solution which you can download. However, my colleague Victor gave a good description of what should be done in order to implement the desired functionality.

Generally, you can find an example of drag and drop between two RadListBoxes in our Examples application, section Combo & ListBox >> ListBox >> ListBox DragAndDrop. This should give you the idea of how the drag and drop fuctionality can be implemented.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Phil
Top achievements
Rank 1
answered on 11 Mar 2010, 04:18 PM
Hi,

What is the RadElement required to drop a node onto a RadDock? I would like to be able to create a DocumentWindow from the information attached to a node.

Thanks

Phil
0
Nikolay
Telerik team
answered on 16 Mar 2010, 11:01 PM
Hello Phil,

Thank you for the question.

You can check whether the element on which you drop a node belongs to RadDock, for example:
RadElement element = this.radDock1.ElementTree.GetElementAtPoint(point);
if (element.ElementTree.Control == this.radDock1)
{
    DocumentWindow doc = new DocumentWindow(nodeText);
    this.radDock1.AddDocument(doc, DockPosition.Left);
}

If you have additional questions, feel free to contact me.

Sincerely yours,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Pearl
Top achievements
Rank 1
answered on 22 Mar 2014, 12:51 PM
Hi Admin,

    I need to perform drag and drop between RadGridView and RadTreeView.
    I have read many other links and forums. But still nothing works out well.
    Could u please share the best solution for it.

Thanks
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 27 Mar 2014, 07:26 AM
Hello Pearl,

Thank you for contacting Telerik Support.

Please, find attached a sample project, demonstrating drag and drop functionality from RadGridView to RadTreeView. A sample video (drag and drop over the browser to play) is enclosed, illustrating better the implemented functionality. Note that this is just a sample solution and it may not cover all possible cases. Feel free to modify it on a way, which suits your requirement best.

Our Drag and Drop help article is quite useful about RadGridView's RadDragDropService. As to the case, related to drag and drop functionality from RadTreeView to RadGridView, please refer to our Modify the DragDropService behavior help article.

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Desislava
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
Tags
Treeview
Asked by
Mahitha Madala
Top achievements
Rank 1
Answers by
Victor
Telerik team
Anthony Pieper
Top achievements
Rank 1
Nikolay
Telerik team
Phil
Top achievements
Rank 1
Pearl
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or