Drag n Drop between Rad Treeview and Rad ListBox

8 posts, 0 answers
  1. Mahitha Madala
    Mahitha Madala avatar
    9 posts
    Member since:
    Aug 2009

    Posted 26 Sep 2009 Link to this post

    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
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 01 Oct 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Anthony Pieper
    Anthony Pieper avatar
    8 posts
    Member since:
    Jul 2009

    Posted 12 Jan 2010 Link to this post

    Is there a way you can post the solution to this in a project file for C# and zip it up?

    Thank you
  5. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 14 Jan 2010 Link to this post

    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.
  6. Phil
    Phil avatar
    13 posts
    Member since:
    Jun 2009

    Posted 11 Mar 2010 Link to this post

    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
  7. Nikolay
    Admin
    Nikolay avatar
    1804 posts

    Posted 16 Mar 2010 Link to this post

    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.
  8. Pearl
    Pearl avatar
    3 posts
    Member since:
    Aug 2013

    Posted 22 Mar 2014 in reply to Nikolay Link to this post

    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
  9. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 27 Mar 2014 Link to this post

    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.

     
Back to Top
UI for WinForms is Visual Studio 2017 Ready