Drag and Drop without holding shift / ctrl keys

4 posts, 0 answers
  1. chandrasekhar
    chandrasekhar avatar
    9 posts
    Member since:
    Oct 2010

    Posted 24 Feb 2011 Link to this post

    Hi,
    i am displaying pdf pages in list view. In same page i have another list view. So i want to drag and drop multiple pages from one list view to another listview.
    To select multiple pages i needs to hold either shift or ctrl key. i am ok with this.
    But i dont want to hold either shift key or ctrl key while drag and drop.

    Please help me out from this problem.

    Thanks,
    Chandu
  2. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 25 Feb 2011 Link to this post

    Hi chandrasekhar,

    Could please share some additional information about your scenario. I am unsure how you display pdf pages in Silverlight as well as the ListView control you are using.

    Greetings,
    Tsvyatko
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. chandrasekhar
    chandrasekhar avatar
    9 posts
    Member since:
    Oct 2010

    Posted 25 Feb 2011 Link to this post

    .xmal
    <xmlns:dragDrop="clr-namespace:Telerik.Windows.Controls.DragDrop;assembly=Telerik.Windows.Controls">
    <DataTemplate x:Key="PageTemplate" >
                <StackPanel Orientation="Vertical" Margin="5"
                            dragDrop:RadDragAndDropManager.AllowDrag="True" dragDrop:RadDragAndDropManager.AllowDrop="True">
                </StackPanel>
    </DataTemplate>
    <DataTemplate x:Key="PageDragTemplate">
                <ListBox x:Name="lstSourceDocumentThumbs"  Style="{StaticResource draggableListBox}"  SelectionMode="Multiple" ItemsSource ="{Binding}"  ScrollViewer.HorizontalScrollBarVisibility="Disabled"
    ScrollViewer.VerticalScrollBarVisibility="Disabled"  Margin="0" ItemTemplate="{StaticResource dragTemplate}">
                  </ListBox>
            </DataTemplate>

    Like that i have two list boxes. Left side and right side. In left side listbox i binded pdf pages. i want to drag and drop pdf pages from left side list box to right listbox.

    .xmal.cs
    private void lstSourceDocumentThumbs_OnDragQuery(object sender, DragDropQueryEventArgs e)
           {
    }


    For multiselection i have to hold shift/ctrl key. But at the time of drag and drop i dont want to hold down either shift or ctrl key.
  5. Tsvyatko
    Admin
    Tsvyatko avatar
    832 posts

    Posted 25 Feb 2011 Link to this post

    Hello chandrasekhar,

    You might want to check this forum thread and the sample project attached. It demonstrates how enable dragging multiple items from listbox.

    All the best,
    Tsvyatko
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top