DragAnDrop By Copy is possible?

5 posts, 0 answers
  1. Laurent DANESI
    Laurent DANESI avatar
    5 posts
    Member since:
    Jan 2010

    Posted 05 Feb 2010 Link to this post

    Hi all,

    Currently i'm using drag and drop feature as selector . But i would like the dragAnDrop not remove Dragged elements from the Drag Source. Instead i would like to be able to put in the DragAnDrop transfert operation a copy of dragged Elements.

    Is that possible or DnD can't do that ?

    Thank you for your support.

    Laurent.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 05 Feb 2010 Link to this post

    Hi Laurent DANESI,

    Drag  and drop is not doing the move/copy operations - it justs reports events on which the developer is taking the appropriate actions. Check this sample:
    http://www.telerik.com/help/silverlight/raddraganddrop-between-listboxes.html

    Regards,
    Valentin.Stoychev
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. DevCraft banner
  4. Laurent DANESI
    Laurent DANESI avatar
    5 posts
    Member since:
    Jan 2010

    Posted 08 Feb 2010 Link to this post

    Hi Valentin,

    Thank you for the valuable support.
    Now i'm able to do my custom Drag Copy Mode.

    It remains a problem.

    My use case is:

    The drag start from a multi data item selection from a radTreeView.

    So when i'm triggered with event OnDragQuery by the DndManager

    I always received only one data item node being transfered instead of all the data items i've selected and want drag

    private void OnDragQuery(object sender, DragDropQueryEventArgs e)
            {

                if (e.Options.Status == DragStatus.DragQuery)
                {
                    var draggedItem = e.Options.Source;
                    Type t = draggedItem.DataContext.GetType();
                    // it is always only one  item data , i should expect a collection of the all the data item i selected and want drag.

    Any ideas ?

    Thanks a lot by advance.

    Laurent




  5. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 11 Feb 2010 Link to this post

    Hi Laurent,

    We have created an example that illustrates how you can darg and drop multiple items from RadTreeView to ListBox.

    In this example is used a hierarchical RadTreeView. You can choose as many items from it as you wish. Using the RadDragAndDrop control you can drop them in a ListBox.

    The items from the RadTreeView aren't deleted.

    Please let us know if you need additional info.

    Regards,
    Tina Stancheva
    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.
  6. Laurent DANESI
    Laurent DANESI avatar
    5 posts
    Member since:
    Jan 2010

    Posted 11 Feb 2010 Link to this post

    Hi Tina ,

    Thank you very much for your valuable support and quick response.

    Laurent
Back to Top
DevCraft banner