Drag and Drop with TreeViewDragCue and Listbox

9 posts, 1 answers
  1. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 14 Jan 2011 Link to this post

    Hi,

    I used a Listbox and I want to drag and drop items into it to reorder them. I used RadDragAndDropManager. I have seen in your samples (http://demos.telerik.com/silverlight/#DragAndDrop/TreeToGrid) that there is a dragcue with the TreeViewDragCue to see where the selected item will be dropped. But when I use the TreeViewDragCue in a Listbox the behavior is different. Is it possible to have the same with a Listbox ?

    Audrey
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 14 Jan 2011 Link to this post

    Hello Audrey,

    The drop indicator in the example of the treeview. In order to create similar experience to the listbox you can follow this help article - http://www.telerik.com/help/silverlight/raddraganddrop-between-listboxes-with-user-feedback.html

    Kind regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 14 Jan 2011 Link to this post

    Thank you.
    But I want to use a WrapPanel into my Listbox as a ItemsPanelTemplate. In this case the DragCue stay on the left and it don't follow the drag action. Do you have an idea to solve my problem ?
  5. Answer
    Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 17 Jan 2011 Link to this post

    Hi Audrey,

    I have prepared project that demonstrate how to create feedback when the ItemsPanel is wrapPanel. Please have a look at the attachment and let me know if you have any further questions.

    Best wishes,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 17 Jan 2011 Link to this post

    Thank you very much.
    It's exactly what I wanted but if I want to select multiple items, only one item is sent to the playload property. How can I do to manage drag and drop for multiple items ?
  7. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 19 Jan 2011 Link to this post

    Hello Audrey,

    I can suggest one additional option in addition to the one, I have suggested in the other thread. You can inherit Microsoft listbox and it mode similar to DragElementAction of our RadGridView. Thus it will have the ability to suppress clearing selection when clicking on selected item.

    Please check the attached project. If you select multiple items from the first ListBox and click on the selected item the selection will not be cleared.

    Kind regards,
    Tsvyatko
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  8. Audrey
    Audrey avatar
    9 posts
    Member since:
    Oct 2010

    Posted 24 Jan 2011 Link to this post

    Thank you for your help !
  9. chandrasekhar
    chandrasekhar avatar
    9 posts
    Member since:
    Oct 2010

    Posted 15 Mar 2011 Link to this post

    problem with de-selection.
    select all / some values from top list box. and try to de-select the item which you already selected.

    Please help me with solution.
  10. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 15 Mar 2011 Link to this post

    Hi chandrasekhar,

     I have updated the sample project so, that MouseUp deselects items if necessary. Please, check the attachment as reference.

    Greetings,
    Tsvyatko
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top
DevCraft banner