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

How to get destined row on drop

1 Answer 53 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Yonggu Kang
Top achievements
Rank 1
Iron
Yonggu Kang asked on 08 Mar 2011, 01:38 PM
Hi, telerik team,

I'd like to make My radtreeview allows 'Drop' only from other control and prohibit
drag & drop within treelistview as well.
So, I placed 'telerik:RadDragAndDropManager.AllowDrop="True" without 'IsDragDropEnabled="True"'
and so far so good, however I can't get target row OnDropInfo.
Follwoing is the part of the code I grabbed from some thread here.

internal void OnDropInfo(object sender, DragDropEventArgs e)
      {
           if (e.Options.Status == DragStatus.DropComplete)
          {
              GridViewRow destinationRow = e.Options.Destination as GridViewRow;
              if (destinationRow == null)
                  return;
              // Get the drag cu that the TreeView or we have created

e.Options.Destination always says 'RadTreeListView' instead of GridViewRow,
so destinationRow is always null.
How could I get target row of treeListView ?

RGDS
Kang

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 08 Mar 2011, 02:23 PM
Hello Yong-Gu Kang,

A functional example of how you can get the drop target you may find here.(source code available there as well)

Since your code is very similar , please check for any differences with the online example I mentioned.
In case you still have troubles finding out what  causes the problem , feel free to open a support ticket , attaching me your project, I will be glad to step trough it and see what may be causing the problem .

Greetings,
Pavel Pavlov
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!
Tags
TreeListView
Asked by
Yonggu Kang
Top achievements
Rank 1
Iron
Answers by
Pavel Pavlov
Telerik team
Share this question
or