How to deactivate Before/After sort in TreeView

3 posts, 0 answers
  1. Ludovic Alcala
    Ludovic Alcala avatar
    24 posts
    Member since:
    Jan 2010

    Posted 11 Jan 2010 Link to this post


    RadControls Treeview version3.5

    .NET version 3.5

    Visual Studio version 2008



    all browsers supported by RadControls

    i want to deactivate the before / after operation and allow only Inside operation (i use treeview drag and drop only to change a hierarchical order).
    Is it possible ?
    I tried to handle the preview ended operation but i don't know how to set my value to the element targeted.

    Is it possible to have second operation with a keypress or other with dragging ? (like i want to have another operation when i drag and i have crontrol key pressed)

    Thank you for all !!!

  2. Miroslav
    Miroslav avatar
    922 posts

    Posted 14 Jan 2010 Link to this post

    Hello Ludovic Alcala,

    Yes, it is possible to disable before / after dropping by handling the DropQuery event and specifying that if the DropPosition is Before or After the drop should not be possible.

    There is a help articles that covers this here:

    If you would like to do something specific depending on a pressed key, you can check the Keyboard.Modifiers and decide what to do depending on the modifiers. A good event to handle there will be either the treeView.DragEnded or RadDragDropManager.DropInfo.

    This article details implementing copy-drag:

    Hopefully this will help you,

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Ludovic Alcala
    Ludovic Alcala avatar
    24 posts
    Member since:
    Jan 2010

    Posted 15 Jan 2010 Link to this post

    Yeah i finally found it, thank you.
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.