Drag n drop: Copy, not move

10 posts, 1 answers
  1. Florent Santin
    Florent Santin avatar
    2 posts
    Member since:
    Aug 2009

    Posted 13 Aug 2009 Link to this post

    Hello,

    I want to add a drag n drop effect between 2 treeview, but i want the item source to can be only copied, not moved.
    How can I do this please?

    Regards,

    Florent
  2. Answer
    Bobi
    Admin
    Bobi avatar
    513 posts

    Posted 14 Aug 2009 Link to this post

    Hi Florent Santin,

    Please find attached a sample project that demonstrates how to use Drag and Drop between 2 RadTreeviews and shows most of the functionality of drag and drop, the usage of different events and other features as well.

    In order to accomplish your scenario please do the following:

    1.Start the sample project
    2.Click "Handle Preview " button
    3.Start drag and drop from the left treeview to the right.

    I hope that the example will be helpful.

    All the best,
    Boryana
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. DevCraft banner
  4. Florent Santin
    Florent Santin avatar
    2 posts
    Member since:
    Aug 2009

    Posted 17 Aug 2009 Link to this post

    Thanks a lot!
  5. Stephane Priolet
    Stephane Priolet avatar
    12 posts
    Member since:
    Mar 2007

    Posted 20 Aug 2009 Link to this post

    Hi Boryana,

    My goal is same than Florent.

    Is it possible to deactivate the "collapsable behaviour" when i drag over source's item neighbour ? And disabling "TextDropBefore", "TextDropAfter", "TextDropIn" properties ?

    The example is clear : "This means that dropping in the same TreeView should have no result" but to my mind we still have visual drag and drop behaviour on left treeview.

    Thanks.
  6. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 20 Aug 2009 Link to this post

    Hi Stephane,

    I am not sure I understand what exactly you are asking. Can you please elaborate a bit more?

    What do you mean by "deactivate the "collapsable behaviour" when i drag over source's item neighbour "? Is it that you don't want a collapsed item to expand when you drag over it?

    Regarding the "TextDropBefore", "TextDropAfter", "TextDropIn" properties - if you do not want to see the default text, you can simply set these properties to empty strings.

    Also, I am not sure I unserstand your last question. Do you want to forbid dropping in the left treeview?

    Please explain a bit more thouroughly and I will be happy to answer.

    Greetings,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Stephane Priolet
    Stephane Priolet avatar
    12 posts
    Member since:
    Mar 2007

    Posted 21 Aug 2009 Link to this post

    Hi Tihomir,

    "Is it that you don't want a collapsed item to expand when you drag over it?"
     - Yes, exactly. Only for the left treeview.

    Please, forget the last question. It was another way to explain the first question.

    Thanks
  8. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 24 Aug 2009 Link to this post

    Hi Stephane,

    Currently the scenario you are describing cannot be achieved nor does a workaround exist. However, after the next internal release this scenario will be supported. This will be done by using an ExpandDelay property(name might change) which will specify a duration during which the RadTreeViewItem will not open.

    Regards,
    Kiril Stanoev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Stephane Priolet
    Stephane Priolet avatar
    12 posts
    Member since:
    Mar 2007

    Posted 24 Aug 2009 Link to this post

    Ok Kiril,

    Thank you, we are waiting for next release.

    Best regards
  10. Miroslav
    Admin
    Miroslav avatar
    922 posts

    Posted 26 Aug 2009 Link to this post

    Hi Stephane,

    I just want to update you on the status of the Drop delay  - it is implemented as a property of the TreeView: DropExpandDelay. It defaults to 1 second.

    The property should be available with the next internal build.

    Kind regards,
    Miroslav
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. Stephane Priolet
    Stephane Priolet avatar
    12 posts
    Member since:
    Mar 2007

    Posted 12 Oct 2009 Link to this post

    Thank you Miroslav,

    We will wait for the next quarter release to do it.
Back to Top
DevCraft banner