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

Drag initiates when over scrollbar

7 Answers 70 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
PaulCo
Top achievements
Rank 1
PaulCo asked on 23 Nov 2009, 05:40 PM
Hi,
I've observed the following behavior in the 09-Q3 version:
I've got both a RadTreeview and a standard listbox. I used RadDragDropManager To enable drag&drop.
However when I move the vertical scrollbar (leftbutton down, and moving cursor over the scrollbar - traditional laptop style), the DragQuery Event is called. As far as I remember I didn't observe this behavior on the Q2 version.  This happens both on the treeview and the listbox.
Is this a bug, or am I missing something?

7 Answers, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 27 Nov 2009, 11:19 AM
Hello PaulCo,

There was a change i how DragDrop works. In the Q2 there was a limitation that did not allow controls that capture the mouse to be dragged. Such controls are the buttons and the Thumb of the ScrollViewer.

We had requests to enable dragging all objects, so if you set if you enable dragging on the whole ItemsControl (i.e. set IsDragEnabled=true on the ListBox), dragging will be able to start from the thumbs as well.

In this case I can suggest enabling dragging just on the items of the ListBox and not the ListBox itself.

I understand that this behavior is unexpected. I will look into an easier way to handle this case, so that dragging will not start while moving the ScrollBar thumb and I will reply here.

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
KO
Top achievements
Rank 1
answered on 03 Jun 2010, 06:19 PM
Hello,

I'm using the latest build and this undesirable behavior is still present. Any news on the easier way to exclude the scrollbar thumb from drag/drop?

Thank you,

KO
0
Miroslav
Telerik team
answered on 09 Jun 2010, 11:57 AM
Hi KO,

Is it possible that dragging is enabled for the whole listbox? In this case I can suggest enabling dragging only for the items.

An alternative approach will be to mark the vertical scrollbar as draggable (IsDragAllowed=true) but add a handler which will deny all drags from it. (I.e. you can use a class event handler to disable drag for all scrollbars).

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
Vinod Sardar
Top achievements
Rank 1
answered on 16 Jun 2010, 08:58 AM
Could you please provide me sample how to set Drag-Drop on the ListBox Item. I am setting the Listbox Item Source to List<Entity>. Entity is my own class.

Let me know if you need more information.

Thanks in advanced.
0
Tina Stancheva
Telerik team
answered on 18 Jun 2010, 03:32 PM
Hello Vinod Sardar,

If you want to allow dropping onto a ListBoxItem, you can set the ItemContainerStyle property of the ListBox and AllowDrop for the ListBox items, like so:
<UserControl.Resources>
    <Style TargetType="ListBoxItem" x:Key="ListBoxItemStyle">
        <Setter Property="telerikDragDrop:RadDragAndDropManager.AllowDrop" Value="True"/>
    </Style>
</UserControl.Resources>
 
<ListBox x:Name="listBox"
    ItemContainerStyle="{StaticResource ListBoxItemStyle}"
    ItemTemplate="{StaticResource listBoxTemplate}"/>

Then if you handle the OnDropInfo() event of the ListBox, you will be able to access the ListBox destination item and apply a custom logic to implement the drop operation.

I hope this information will help you. However, should you need more info, please do not hesitate to contact us.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverilght applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Greetings,
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
0
raven
Top achievements
Rank 1
answered on 23 Jun 2010, 08:20 PM
Can you tell me how i can do it for RadGridView?
0
Vlad
Telerik team
answered on 24 Jun 2010, 06:32 AM
Hello,

 You can check this demo for more info.

Kind regards,
Vlad
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
PaulCo
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
KO
Top achievements
Rank 1
Vinod Sardar
Top achievements
Rank 1
Tina Stancheva
Telerik team
raven
Top achievements
Rank 1
Vlad
Telerik team
Share this question
or