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

Drop anywhere .. RadDragandDropManager

6 Answers 106 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Arundhati Patel
Top achievements
Rank 1
Arundhati Patel asked on 04 Dec 2009, 04:39 PM

Hi,
With RadDragandDropManager, I am dropping items in a Listbox (which is working fine). But I need to drop anywhere in List box. I don't want the Orientation to be set as Horizontal or vertical. This requirement is for a UI designer.

There can be 3 items (Horizontally ) and say 1 item vertically .. depends where user drops the item. Is this possible? Anyone can suggest me approach or any work around?

Thanks & Regards

Arundhati

6 Answers, 1 is accepted

Sort by
0
Arundhati Patel
Top achievements
Rank 1
answered on 08 Dec 2009, 05:35 PM
Any update .. Suggestion on my above post?
0
Miroslav
Telerik team
answered on 09 Dec 2009, 10:26 PM
Hi Arundhati Patel,

I am sorry for the delayed reply!

 I am not sure I understand your problem clearly. Could you expand on it a bit or possibly send a screenshot if this is a design issue?

The DragDrop should not depend on the design, so it will work regardless of whether the items in the ListBox are stacked horizontally or vertically.

If you can drop items in the list box just over existing items and you want this to be possible over the visible background of the ListBox as well, then you can set the ListBox as drop target as well, i.e. set the AllowDrop property:

dragDrop:AllowDrop="true" 

Normally the position of the items in the ListBox depends on its ItemsPanel. If you change the ItemsPanel then the arrangement of the items will change as well.

Kind regards,
Miroslav
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.
0
Arundhati Patel
Top achievements
Rank 1
answered on 09 Dec 2009, 11:27 PM

Hi Miroslav ,
Thanks for the reply. I am actually searching for solution where I can position ListItems in the listbox where I drop them.

Say I drag an item and drop on 1st row .. then I drag another item and place in 2nd column …Where every I drop the item, It should be positioned.

This requirement is for a UI designer …

Currently I can position items vertically or horizontally .. or with the help of grid (I can have fixed rows and columns)

But my requirement is a free – flow placement ..

Can you please help to find a solution?
Please let me know if I am not clear.

Thanks & Regards
Arundhati

0
Miroslav
Telerik team
answered on 15 Dec 2009, 01:15 PM
Hi Arundhati Patel,

 Have you considered using a Canvas? This will give you the ultimate freedom for placement of the items.

Generally you can use the DragDrop to rearrange items in a Grid or Canvas panel but then how would the initial layout happen?

If can provide the code for the initial layout of the items in a ListBox then I will be happy to hook it up with the DragDrop so that items can be rearranged.

All the best,

Miroslav
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.
0
Arundhati Patel
Top achievements
Rank 1
answered on 21 Dec 2009, 06:17 PM

Hi Miroslav,
Thanks for replying my Qs ...
Well if I add Canvas, I will be adding Grid too (where I will be specifying rows and columns) ...
So when I drop on the listbox, it automatically gets dropped on the next cell. Where as, I want to drop on the cell where my mouse is over.
(Say, in http://demos.telerik.com/silverlight/#DragAndDrop/FirstLook example, we drag an item and drop on the list, It will get adjusted on 1st row - 1st column. whereas I dropped it on 2nd row. 
Is there any other way, any controls .. where the item will  be dropped where I drop it (on that place over control where mouse has dropped it)
?

 

Thanks  & Regards

Arundhati

0
Valentin.Stoychev
Telerik team
answered on 23 Dec 2009, 09:06 AM
Hello Arundhati Patel,

There is no such control. It is actualy up to the developer to implement the custom logic that will be executed when the item is dropped.

Sincerely yours,
Valentin.Stoychev
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.
Tags
DragAndDrop
Asked by
Arundhati Patel
Top achievements
Rank 1
Answers by
Arundhati Patel
Top achievements
Rank 1
Miroslav
Telerik team
Valentin.Stoychev
Telerik team
Share this question
or