Is Multiple Item Drag & Drop Possible Between ListBoxes

7 posts, 0 answers
  1. steve
    steve avatar
    23 posts
    Member since:
    Jul 2009

    Posted 28 Jan 2010 Link to this post

    Is it possible to drag and drop multiple items between listboxes? I have this working between radgridviews in Q3 2009 release but I am unhappy with the look and an extra column keeps being generated.
    If so a sample proj would be greatfuly appreciated.

  2. Kiril Stanoev
    Kiril Stanoev avatar
    1511 posts

    Posted 29 Jan 2010 Link to this post

    Hello Steve,

    A certain problem arises when trying to implement the scenario you are talking about. You will notice that when multiple items are selected in windows explorer and you click on one of them the selection is changed on MouseUp. The Silverlight ListBox though changes its selection on MouseDown. Generally you can cancel the mouse event and prevent this, but then you do not know if the user is going to drag the items or not. You may need to inherit the ListBox control and its items to change how they handle selection to achieve this effect.

    Currnetly the RadTreeView supports the kind of DragDrop out of the box. Do you think that you will be able to use it?

    If you do not use a HierarchicalDataTemplate the TreeView will behave very much like a ListBox. There are some minor differences in the API and look between the two controls but we will be happy to help you get around them if you decide to go this way.

    I have attached a sample project demonstrating the issue with drag and drop between multi-select listboxes. Have a look at it and let me know what's your opinion on the topic.

    Kiril Stanoev
    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. DevCraft banner
  4. Sergey Arutchev
    Sergey Arutchev avatar
    14 posts
    Member since:
    Sep 2009

    Posted 04 Nov 2010 Link to this post

    Hi Kiril,

    I would like to use TreeView as ListBox to deal with multiline selection issue during drag and drop.
    Could you please provide info how to style TreeView so it looks like ListBox (remove expander).

  5. Zarko
    Zarko avatar
    755 posts

    Posted 09 Nov 2010 Link to this post

    Hello Sergey Arutchev,

     If you just want to remove the expander you should use the ExpanderStyle property and set it a style with empty template. Please examine the attached project and if you have further questions feel free to ask. 

    Kind regards,
    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. Sergey Arutchev
    Sergey Arutchev avatar
    14 posts
    Member since:
    Sep 2009

    Posted 09 Nov 2010 Link to this post

    Hi Zarko,

    Thank you for the explanation and example. It was very helpfull.

  7. neo e
    neo e avatar
    19 posts
    Member since:
    Jul 2004

    Posted 15 Nov 2010 Link to this post

    will this feature be implemented in the listbox in the near future? I am also looking for functionality like that in the listbox.
  8. Petar Mladenov
    Petar Mladenov avatar
    2891 posts

    Posted 16 Nov 2010 Link to this post

    Hi neo e,

    We cannot provide the same functionality for the ListBox due to the MouseEvents implementation in the control that Kiril previously described. However, you can take advantage of the RadTreeView to implement such scenarios and it can be styled to look and feel like the ListBox control. If this is an option for you and you need more help with the RadTreeView control, let us know and we will gladly assist you. 

    Kind regards,
    Petar Mladenov
    the Telerik team
    See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Back to Top
DevCraft banner