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

TreeView

1 Answer 38 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
RR
Top achievements
Rank 1
RR asked on 25 Mar 2016, 11:37 AM
I have a treeView using an ItemTemplate
<ScrollViewer HorizontalScrollBarVisibility="Auto"
              VerticalScrollBarVisibility="Auto" BorderThickness="0">
                             <navi:RadTreeView x:Name="rdtreeCheckLists"
                                   SelectedItem="{Binding SelectedOrgCheckList, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"                                     
                                   HorizontalContentAlignment="Left"
                                   ItemsSource="{Binding CheckListWithItems, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                                   ItemTemplate="{StaticResource CheckListTemplate}"
                                   SelectionChanged="rdtreeCheckLists_SelectionChanged"
                                   SelectionMode="Single"
                                   IsDragDropEnabled="True">
                             </navi:RadTreeView>
                         </ScrollViewer>

Item template is like this

<telerik:HierarchicalDataTemplate x:Key="CheckListTemplate" ItemsSource="{Binding SubItems,Mode=TwoWay}">
            <StackPanel Orientation="Horizontal">
                <Image Source="../Images/add_to_group.jpg" Width="15" Height="15"></Image>
                <TextBox Text="{Binding Name,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
                         BorderThickness="0" BorderBrush="Transparent"
                         IsReadOnly="{Binding  RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=UserControl},
                         Path=DataContext.IsReadOnly,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
                        <telerik:RadRibbonButton
                            SmallImage="../Images/icon_delete_normal.png"
                            HorizontalAlignment="Right" Click="CheckListDelete_Click"                               
                            IsEnabled="True"
                            Width="Auto" Height="17"  CommandParameter="{Binding Id, Mode=TwoWay}"  CommandTarget="{Binding Type, Mode=TwoWay}" />
            </StackPanel>
        </telerik:HierarchicalDataTemplate>

I have binded a HierarchicalDataModel "CheckListWithItems" which has SubItems property. 

The problem is in DragDrop Items into tree view. When i drop item into tree view the latter version it doesn't show dropped item as child. Even when i add it in code it shows only most upper level items. 

The problem is in Telerik.Windows.Control RuntimeVersion v4.0.30319 / Version 2014.3.1202.1050 this WORKS. but NOT in  RuntimeVersion v4.0.30319 / Version 2015.3.1104.1050

I have the same code only with replaced dlls. 

How to resolve this?

Thank you in advance

1 Answer, 1 is accepted

Sort by
0
Accepted
Martin Ivanov
Telerik team
answered on 28 Mar 2016, 10:00 AM
Hi Roshan,

I tested your code but I wasn't able to reproduce the described behavior. Can you please take a look at the attached project and let me know if I am missing something?

Regards,
Martin
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
TreeView
Asked by
RR
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or