Drag initiates when over scrollbar

8 posts, 0 answers
  1. PaulCo
    PaulCo avatar
    5 posts
    Member since:
    Oct 2009

    Posted 23 Nov 2009 Link to this post

    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?
  2. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 27 Nov 2009 Link to this post

    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.
  3. DevCraft banner
  4. KO
    KO avatar
    16 posts
    Member since:
    Apr 2010

    Posted 03 Jun 2010 Link to this post

    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
  5. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 09 Jun 2010 Link to this post

    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.
  6. Vinod Sardar
    Vinod Sardar avatar
    33 posts
    Member since:
    Nov 2009

    Posted 16 Jun 2010 Link to this post

    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.
  7. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 18 Jun 2010 Link to this post

    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
  8. raven
    raven avatar
    4 posts
    Member since:
    Jul 2007

    Posted 23 Jun 2010 Link to this post

    Can you tell me how i can do it for RadGridView?
  9. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 24 Jun 2010 Link to this post

    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
Back to Top
DevCraft banner