Drag and drop

8 posts, 0 answers
  1. Max
    Max avatar
    7 posts
    Member since:
    Dec 2010

    Posted 13 Dec 2010 Link to this post

    Hello,
    I need to implement a drag and drop to reorder rows in a RadTreeListView, and to drop items from RadTreeView to the RadTreeListView control.
    Do you have some example of this and also example on how to build the dragged tooltip.

    Thank you
  2. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 15 Dec 2010 Link to this post

    Hi Max,

    Have you checked out this drag and drop demo? It demonstrates how such functionality can be implemented.

    Greetings,
    Milan
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  3. UI for WPF is Visual Studio 2017 Ready
  4. Max
    Max avatar
    7 posts
    Member since:
    Dec 2010

    Posted 15 Dec 2010 Link to this post

    Hey.
    Thank you for the reply. I saw this and few other examples - they are all implemented in very different code and none  is for the RadTreeListView control.
    Trying to use them on the control didn't go very well and had problems.
    I found this example and customized it to work with the RadTreeListView control but I have no idea whether the implemintation is best practice.
    Can you please see the implementation?
    Thanks
    The download link:
    http://rapidshare.com/files/437096855/158684_dragdrop-reorder-grid_v2.zip
  5. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 21 Dec 2010 Link to this post

    Hi Max,

    I am attaching a small sample app which demonstrates the lighter approach to drag and drop  items in RadTreeListView. 

    Kind regards,
    Pavel Pavlov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  6. Max
    Max avatar
    7 posts
    Member since:
    Dec 2010

    Posted 23 Dec 2010 Link to this post

    Thank you.
    I adapted the prev sample to the control and now I have few problems, I'm a attaching link to the solution.
    I implemented the drag and drop on the right grid.

    http://rapidshare.com/files/438910198/158684_dragdrop-reorder-grid_v4.rar

    1. Once you drag and place the mouse on the line between items it starts blinking in a loop.
    2. Once you set : 
    RadDragAndDropManager.EnableNativeDrag = true;
    The tooltip location is wrong.
    3. Once you change the tabs few times - the drag and drop stops firing events and working in general.

    Please reviews this problems.
    Thank you
  7. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 03 Jan 2011 Link to this post

    Hello Max,
    Thank you for reporting these issues ! I was able to clearly reproduce issues 1 and 3 with your sample project.
    We are already working on fixing this.

    Regarding Issue #2 ( the wrong location of the tooltip ) - I am not sure I could reproduce it.

    One more time thank you for your collaboration on this one ! I am updating your Telerik points.

    All the best,
    Pavel Pavlov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
  8. Max
    Max avatar
    7 posts
    Member since:
    Dec 2010

    Posted 03 Jan 2011 Link to this post

    Hello,
    First of all thanks for the reply.
    Secondly, to reproduce the second issue you need to find the line in code where II do this command:  RadDragAndDropManager.EnableNativeDrag = true;
    If it is set to true, the preview of the dragged item is not moving correctly. just try to move the dragged item around the screen. If I set it to false the preview of the dragged item moves as expected.

    Thanks
  9. Tsvyatko
    Admin
    Tsvyatko avatar
    833 posts

    Posted 06 Jan 2011 Link to this post

    Hi Max,

    In order to use RadDragAndDropManager.EnableNativeDrag you need to set it before setting allowdrag/drop properties or event handlers. Best way to it is in the App constructor. Let me know if this helps.

    All the best,
    Tsvyatko
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for WPF
Back to Top
UI for WPF is Visual Studio 2017 Ready