This is a migrated thread and some comments may be shown as answers.

Prevent Dropping nodes on self

5 Answers 28 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Billy G
Top achievements
Rank 1
Billy G asked on 12 May 2010, 10:57 PM
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.

5 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 13 May 2010, 05:27 PM
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.
0
Billy G
Top achievements
Rank 1
answered on 13 May 2010, 05:34 PM
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
0
Valentin.Stoychev
Telerik team
answered on 13 May 2010, 05:38 PM
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.
0
Billy G
Top achievements
Rank 1
answered on 13 May 2010, 09:02 PM
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.
0
Billy G
Top achievements
Rank 1
answered on 13 May 2010, 09:26 PM
I figured it out thank you for the help

 ItemContainerStyle="{StaticResource RadTreeViewitemStyle}"
Tags
TreeView
Asked by
Billy G
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Billy G
Top achievements
Rank 1
Share this question
or