How to get destined row on drop

2 posts, 0 answers
  1. YongKoo Kang
    YongKoo Kang avatar
    101 posts
    Member since:
    Jan 2010

    Posted 08 Mar 2011 Link to this post

    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)
                  // 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 ?

  2. Pavel Pavlov
    Pavel Pavlov avatar
    2039 posts

    Posted 08 Mar 2011 Link to this post

    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 .

    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!
  3. DevCraft R3 2016 release webinar banner
Back to Top