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

Multiple Selection on Control

2 Answers 119 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
ankit
Top achievements
Rank 1
ankit asked on 15 Mar 2009, 09:50 PM
  • Is It possible to have multiple selection on Dragable List box ? If yes how ?
  • Also, How can this possible for custom control like If I have 2 images in grid and i want to move both together at a same time

I would say this might be admin question.
Thanks in advance.

2 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 19 Mar 2009, 12:46 PM
Hello Ankit,

Sorry for the delayed reply,

The example with the Draggable ListBox just shows how you can augment a control with drag-drop. Basically when the drag starts, you choose what elements will be dragged, so it will also work with multiple selected elements.

Unfortunately the default ListBox, used in the example does not support multiple selection and there is no easy way to add this.

The drag/drop though can be added to almost any control (excluding these which capture the mouse, like buttons), so it will be possible to drag elements form any control that supports multiple selection.

For your second question: When the drag starts, you can add anything in the DragCue, including the whole grid with the two images.

If you do not like to modify the visual tree and you are looking to move elements around like on a design canvas, you can make the draggable elements drag sources (AllowDrag=True) and the design canvas (a parent canvas panel) the drag destination. Then on every drop query you will set the Canvas.Left and Canvas.Top for the dragged object.

Best wishes,
Miroslav
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Matthew
Top achievements
Rank 1
answered on 13 Apr 2011, 05:39 AM
Is it possible to use a Canvas object as the DragCue?  I have seen examples where Rectangles and images are used.  However, I would like to use a Canvas.  An example would be great.

Thanks,
Matt
Tags
DragAndDrop
Asked by
ankit
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Matthew
Top achievements
Rank 1
Share this question
or