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

How to enable dropping item inside the treeviewitem

1 Answer 13 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Prabakaran asked on 17 Nov 2015, 02:39 AM

Dear Team,

I want to drag and drop items to before/after/drop inside the treeviewitem. i can able to drag and drop before/after the item but not able to drop inside the treeview item. please refer the below xaml script and the attached screenshot for more info. please help to sort this problem. How i could able to drop the item inside another(Parent-child pattern).

                                         ItemsSource="{Binding Categories,Mode=TwoWay}"                                                    
                                                     mouse:MouseDoubleClick.Command="{Binding ShowItemCommand}"
                                         mouse:MouseDoubleClick.CommandParameter="{Binding ElementName=xTreeView,Path=SelectedItem}" IsDragDropEnabled="True"
                                                     telerik:PersistenceManager.StorageId="{Binding test,Mode=TwoWay}">
                                <StackPanel Orientation="Horizontal">
                                    <CheckBox IsChecked="{Binding IsChecked, Mode=TwoWay}"
                                              telerik:StyleManager.Theme="Office_Black" />
                                    <TextBlock VerticalAlignment="Center"
                                               Text="{Binding Name}" />
                                    <TextBlock Text="{Binding InfoTabItemsSourcePath}"
                                               Visibility="Hidden" />

Thank you.



1 Answer, 1 is accepted

Sort by
Martin Ivanov
Telerik team
answered on 19 Nov 2015, 05:25 PM
Hi Prabakaran,

I am not sure that I understand your case. When you enable the drag/drop behavior of RadTreeView the items dragging should be allowed in all sibling elements and in a parent element different than the dragged item's parent. Can you please send me a small example demonstrating the observed behavior and a description of the expected result? This will help me to understand your scenario better and assist you further. Thank you for any provided information.

As a side note, keep in mind that dropping an item into his parent is not allowed by the drag/drop behavior. If you want to override this behavior you can override the DragDropManager's events which are used for implementing the drag/drop logic in RadTreeView. You can find such examples in our help documentation.

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 Feedback Portal and vote to affect the priority of the items
Asked by
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question