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

DropPosition is always Inside - even when it's not really inside

5 Answers 58 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Andrei Rinea
Top achievements
Rank 1
Andrei Rinea asked on 19 Jan 2011, 03:54 PM

I have a small test project to check the Drag/Drop feature of RadTreeListView. Markup:

<t:RadTreeListView ItemsSource="{Binding Items}" IsReadOnly="True" IsDragDropEnabled="True" x:Name="tree" AutoGenerateColumns="False">
<t:RadTreeListView.DragCueItemTemplate>
<DataTemplate>
<StackPanel>
<TextBlock Text="{Binding Name}"/>
<StackPanel Orientation="Horizontal">
<TextBlock Text="Children count : "/>
<TextBlock Text="{Binding Children.Count}"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</t:RadTreeListView.DragCueItemTemplate>
<t:RadTreeListView.ChildTableDefinitions>
<t:TreeListViewTableDefinition ItemsSource="{Binding Children}" />
</t:RadTreeListView.ChildTableDefinitions>
<t:RadTreeListView.Columns>
<t:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Nume"/>
</t:RadTreeListView.Columns>
</t:RadTreeListView>

 

 

 

 


Nothing fancy here... I bind it to a simple hierarchy of Node's and if I drag an item I receive this event in 

 

 

 

private static void TreePreviewDragEnded(object sender, RadTreeListViewDragEndedEventArgs e)
{
Debug.WriteLine("DropPosition: " + e.DropPosition);
Debug.WriteLine("IsCanceled: " + e.IsCanceled);
Debug.WriteLine("TargetDropItem: " + (e.TargetDropItem == null ? "<null>" : e.TargetDropItem.ToString()));
Debug.WriteLine("DraggedItems: " + e.DraggedItems);
if (e.DraggedItems.Count > 0)
{
foreach (var item in e.DraggedItems)
{
Debug.WriteLine(" Dragged item : " + item);
}
}
Debug.WriteLine("-----------------");
}



The issue is that no matter if I drop between (see attachment 1) or drop inside (see attachment 2) in the PreviewDragEnded event handler I always get e.DropPosition == Inside.

Am I doing something wrong?

5 Answers, 1 is accepted

Sort by
0
Tsvyatko
Telerik team
answered on 25 Jan 2011, 03:18 PM
Hello Andrei Rinea,

We have have checked the described scenario and seems that there is issue regarding this functionality.

I have logged this in our PITS system where you can track its progress - http://www.telerik.com/support/pits.aspx#/public/silverlight/4699

I have also updated your telerik points.

Kind regards,
Tsvyatko
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Andrei Rinea
Top achievements
Rank 1
answered on 07 Feb 2011, 05:24 PM

Thanks,

However the platform I'm experiencing is WPF and not Silverlight. Maybe it's the same codebase but I don't know this for sure.

0
Vlad
Telerik team
answered on 08 Feb 2011, 08:09 AM
Hi,

 Indeed the issue is for both platforms. Here is the correct link for WPF:
http://www.telerik.com/support/pits.aspx#/public/wpf/4699

Regards,
Vlad
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
John Slocum
Top achievements
Rank 1
answered on 27 May 2014, 07:51 PM
Hi,

I'm currently having this same issue, but the links that were provided don't really show anything.
I assume they used to be routed somewhere else.  Is there a new place one might find the answer to this question?

Thanks

0
Nick
Telerik team
answered on 28 May 2014, 10:14 AM
Hello John,

The issue was fixed recently, you can check our latest internal builds to see if the problem is solved with your scenario. 

Regards,
Nik
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TreeListView
Asked by
Andrei Rinea
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Andrei Rinea
Top achievements
Rank 1
Vlad
Telerik team
John Slocum
Top achievements
Rank 1
Nick
Telerik team
Share this question
or