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

Drag and Drop within Listbox

10 Answers 141 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Anthony Pieper
Top achievements
Rank 1
Anthony Pieper asked on 02 Nov 2009, 03:33 PM
We have two listboxes that we currently can drag and drop between. When dragging the arrow appears to show which listbox you are dragging from and dragging to, which is what we want.

We need to know have a listbox drag within itself (not a treeview). There is an example in the forum, however it is using a Style to set the appearance of the listbox, we don't want to use a Style, but assign it directly in the xaml of the listbox. We need to have it look like the horizontal bar when dragging between items, how can I acheive this?

I'm not sure if this matters, but our listbox is populated using a linq query.

10 Answers, 1 is accepted

Sort by
0
Bobi
Telerik team
answered on 04 Nov 2009, 02:19 PM
Hi Anthony Pieper,

Please find attached two sample projects that shows how to accomplish the desired functionality.
1.The first example is without a custom Style and AllowDropProperty is set in code.

           this.listBox1.SetValue(RadDragAndDropManager.AllowDropProperty,true);
            this.listBox2.SetValue(RadDragAndDropManager.AllowDropProperty,true);

2.The second one contains a custom  Style for ListBox.

I hope that this will be helpful.


Sincerely yours,
Boryana
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
Alan
Top achievements
Rank 2
answered on 01 Mar 2010, 02:46 PM
Do you have a similar example that shows how to drag/drop/reorder with a ListBox that is oriented horizontally instead of vertically?  I can get the items to appear horizontally, but I can't figure out how to position the DropCueElement so that the dark gray bar will appear correctly between items.

Here is the setter that I've added to the ListBox style in order to get the items to appear horizontal in the ListBox:

<Setter Property="ItemsPanel"
                <Setter.Value> 
                    <ItemsPanelTemplate> 
                        <StackPanel Orientation="Horizontal" 
                          VerticalAlignment="Stretch" 
                          HorizontalAlignment="Left"/> 
                    </ItemsPanelTemplate> 
                </Setter.Value> 
            </Setter> 

Any suggestions?  Thanks.
0
Miroslav
Telerik team
answered on 03 Mar 2010, 04:11 PM
Hi Alan,

I modified the example so that it will work with horizontal ListBoxes.

Hopefully this is what you need,

Best wishes,
Miroslav
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.
0
Alan
Top achievements
Rank 2
answered on 03 Mar 2010, 04:14 PM
Yes, this is great!  Thank you.
0
Flemming Rosenbrandt
Top achievements
Rank 1
answered on 07 Apr 2010, 11:09 AM

Is reordering of items on the roadmap for DragAndDropManager? Silverlight Toolkit has it out of the box..

 

/Flemming Rosenbrandt

0
Valentin.Stoychev
Telerik team
answered on 12 Apr 2010, 01:34 PM
Hello Flemming Rosenbrandt,

Can you send us an example where this is out of the box. Thanks!

Best wishes,
Valentin.Stoychev
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.
0
Flemming Rosenbrandt
Top achievements
Rank 1
answered on 13 Apr 2010, 10:09 AM

Hi

 

The Silverlight Toolkit Drag and Drop example has a listbox where you can rearrange the items.

 

http://www.silverlight.net/content/samples/sl3/toolkitcontrolsamples/run/default.html

 

/Flemming Rosenbrandt

0
Valentin.Stoychev
Telerik team
answered on 14 Apr 2010, 07:18 AM
Hi Flemming Rosenbrandt,

It is not out of the box, but I see your point. We will see how to make it simpler with the Telerik drag and drop manager.

Sincerely yours,
Valentin.Stoychev
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.
0
Robert Staniskis
Top achievements
Rank 1
answered on 07 Jul 2010, 05:29 PM
Hi,

I know this thread is a few months old, but I thought I would share with you all that the Silverlight Toolkit drapdrop functionality DOES NOT work when your silverlight xap file is running in the FireFox or Safari browser.  I also verified that the Telerik drag drop functionality DOES work in these scenarios.  I had been using the Silverlight Toolkit's drag drop until I discovered the issue with it.

While the Telerik soltution to drag drop is not as simple to implement as the Control Toolkit, I am so glad that is works in all browsers!

Thanks guys,

Robert
0
Tina Stancheva
Telerik team
answered on 12 Jul 2010, 06:12 PM
Hello Robert Staniskis,

Thank you for the feedback. We highly appreciate any comments and suggestions on the matter.

Also, if we can assist you in implementing DragAndDrop scenarios using the RadDragAndDropManager, please do not hesitate to contact us. We will be more than happy to assist you in any way we can.

Thank you again.

All the best,
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
Tags
DragAndDrop
Asked by
Anthony Pieper
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Alan
Top achievements
Rank 2
Miroslav
Telerik team
Flemming Rosenbrandt
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Robert Staniskis
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or