RadTreeView - Drop Inside RadTreeViewItem

4 posts, 1 answers
  1. Jason
    Jason avatar
    6 posts
    Member since:
    Oct 2011

    Posted 07 May 2013 Link to this post

    Hello Telerik,
    I am attempting to configure the visual for a RadTreeViewItem to only show the Drop Inside functionality. However, the article on the help pages is outdated, and references an obsoleted class.

    With 2013 Q1, how do you configure the desired functionality to:
    Hide 'Drop Before/After'
    Hide Line between items in the tree view
    Show 'Drop Inside'

    Additional note:
    I am using the PreviewDragEnded event to handle the dropped item with custom business logic. The dropped item will not go in an IList which the RadTreeViewItem object contains. This is simply to configure the UI visual which the user views, not to actually move data around using the control.
  2. Answer
    Pavel R. Pavlov
    Pavel R. Pavlov avatar
    1237 posts

    Posted 10 May 2013 Link to this post

    Hi Jason,

    Recently we changed the build-in drag-drop manager of the RadTreeView control. In the past it used the RadDragAndDropManager, which is now obsolete. Currently you are allowed to choose which manager to use (the obsolete one or the currently supported one). This can be done by setting the telerik:TreeViewSettings.DragDropExecutionMode attached property. If you set it to Legacy you will use the obsolete manager, otherwise (setting it to New) you will use the DragDropManager. In the future we will delete the obsolete manager and the control will use the new one.

    Please note that in order to use the new manager you will have to subscribe to the desired events and customize the drag-drop logic according to your scenario. You can do this using this code just after the InitializeComponent() method:

    DragDropManager.AddDragInitializeHandler(this.xTree, OnTreeDragInitialize);        
    this.xTree, OnTreeDrop);
    DragDropManager.AddDragOverHandler(this.xTree, OnTreeDragOver);
    For more information about the DragDropManager you can refer to this article.

    Furthermore, you can take a look at our online demonstration projects and see how we use custom behaviors.

    I hope this will work for you.

    Kind regards,
    Pavel R. Pavlov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. Thanh
    Thanh avatar
    1 posts
    Member since:
    Sep 2008

    Posted 01 Sep 2015 Link to this post


     I am using dll Version 2011.1.516.1040, I can't do action "Drop Inside" or "Drop After" a node, it just let me "Drop Before", no matter how I tried.

    I use Telerik example to test :

     <telerik:RadTreeView x:Name="radTreeView" IsDragDropEnabled="True">
                        <telerik:RadTreeViewItem Header="Sport Categories">
                            <telerik:RadTreeViewItem Header="Football">
                                <telerik:RadTreeViewItem Header="Futsal"/>
                                <telerik:RadTreeViewItem Header="Soccer"/>
                            <telerik:RadTreeViewItem Header="Tennis">
                                <telerik:RadTreeViewItem Header="Table Tennis"/>
                            <telerik:RadTreeViewItem Header="Cycling">
                                <telerik:RadTreeViewItem Header="Road Cycling"/>
                                <telerik:RadTreeViewItem Header="Indoor Cycling"/>
                                <telerik:RadTreeViewItem Header="Mountain Bike"/>

                        <telerik:RadTreeViewItem Header="Sport Categories 2">
                            <telerik:RadTreeViewItem Header="Cycling 2">
                                <telerik:RadTreeViewItem Header="Road Cycling 2"/>
                                <telerik:RadTreeViewItem Header="Indoor Cycling 2"/>
                                <telerik:RadTreeViewItem Header="Mountain Bike 2"/>

    => But when I use the older version 2010.3.1213.1040, it let me "Drop Inside". 

    Could you please explain that ? 

    My runtime version need to use Version 2011.1.516.1040



  4. Martin Ivanov
    Martin Ivanov avatar
    1444 posts

    Posted 03 Sep 2015 Link to this post

    Hi Thanh,

    I tested version 2011.1 516 of UI for Silverlight with the code snippet from your last reply but I wasn't able to reproduce the described behavior. The drop inside and drop after operations work as expected. If possible for you, I recommend you to upgrade to the latest version of the Telerik controls so you can take advantage of the newest features and bug fixes.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top