Prevent Dropping nodes on self

6 posts, 0 answers
  1. Billy G
    Billy G avatar
    9 posts
    Member since:
    Mar 2010

    Posted 12 May 2010 Link to this post

    I want to prevent a user from reordering the nodes in a tree while allowing them to drop the node on a grid but I can not seem to figure this out.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 13 May 2010 Link to this post

    Hi Billy G,

    Please check this help article:
    http://www.telerik.com/help/silverlight/radtreeview-features-drag-and-drop.html

    you need to set the IsDropAllowed property to the items.

    Greetings,
    Valentin.Stoychev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. Billy G
    Billy G avatar
    9 posts
    Member since:
    Mar 2010

    Posted 13 May 2010 Link to this post

    I looked over that article however My Tree Is Databound along with using the load on Demand.. how would you set it in this instance
  4. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 13 May 2010 Link to this post

    Hi Billy G,

    You can use a style in your case and to set the property in the style:
    <Style TargetType="telerikNavigation:RadTreeViewItem">
                <Setter Property="IsDropAllowed" Value="False" />
            </Style>

    And then just appy this style to your treview.

    All the best,
    Valentin.Stoychev
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  5. Billy G
    Billy G avatar
    9 posts
    Member since:
    Mar 2010

    Posted 13 May 2010 Link to this post

    I am not using RadTreeViewItems but HierarchicalDataTemplate

    I Just want to Set the Whole TREEVIEW to isdropallowed = false.. Surely you have though that someone would want to disable it for the Whole Control.
  6. Billy G
    Billy G avatar
    9 posts
    Member since:
    Mar 2010

    Posted 13 May 2010 Link to this post

    I figured it out thank you for the help

     ItemContainerStyle="{StaticResource RadTreeViewitemStyle}"
Back to Top