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

Drag and drop of TreeView items inside RadDropDownButton

2 Answers 82 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Gert
Top achievements
Rank 1
Gert asked on 22 Jun 2020, 07:02 AM

Hi,

I have a RadTreeView inside RadDropDownButton.DropDownContent.

What I want to achive is to reorder TreeView Items inside the dropdowncontent. I testet my behaviour having only a TreeView - this works. Now when I put the TreeView in the RadDropDownButton.DropDownContent, dragging does not work any more on the TreeView.

 

<telerik:RadDropDownButton
       Height="26"
       AutoOpenDelay="0:0:0.0"
       Content="Click"
       IsOpen="True">
       <telerik:RadDropDownButton.DropDownContent>
           <telerik:RadTreeView
               x:Name="xTreeView"
               Margin="8"                 
               IsDragDropEnabled="True"
               ItemTemplate="{StaticResource League}"
               ItemsSource="{Binding Source={StaticResource DataSource}, Path=LeagueObjects}" />
       </telerik:RadDropDownButton.DropDownContent>
   </telerik:RadDropDownButton>

2 Answers, 1 is accepted

Sort by
0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 25 Jun 2020, 06:44 AM

Hi Gert,

Thank you for the provided code snippet.

I was able to reproduce it. The problem comes from the fact that when the RadTreeView is placed inside the RadDropDownButton-DropDownContent, the items do not catch the drag operation. You can easily fix this by setting the telerik:DragDropManager.AllowCapturedDrag property. You can set it through implicit style.

<Window.Resources>
    <Style TargetType="telerik:RadTreeViewItem">
        <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
    </Style>
</Window.Resources>

Regards,
Dinko
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Gert
Top achievements
Rank 1
answered on 02 Jul 2020, 07:35 AM
That solved the issue, thanks a lot!
Tags
DragAndDrop
Asked by
Gert
Top achievements
Rank 1
Answers by
Dinko | Tech Support Engineer
Telerik team
Gert
Top achievements
Rank 1
Share this question
or