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

Drag/Drop Icon

1 Answer 38 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
sum sum
Top achievements
Rank 1
sum sum asked on 10 Nov 2009, 10:12 PM
Hi Guys,

I am new to Telerik TreeView control. If I try to drag a node to itself I can see the 'Stop' Icon which means it is a invalid target. What I am trying to do is to set certain nodes to be invalid targets so that when people drag nodes to these targets, they will see the Stop icon. Which event can I catch the drag movement or where else can I do this and how?

Thanks for the help in advance.

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 12 Nov 2009, 01:13 PM
Hi sum sum,

RadTreeViewItem has a property called IsDropAllowed. If it is False, then you cannot drop into that node.

<telerikNavigation:RadTreeView IsDragDropEnabled="True">
    <telerikNavigation:RadTreeViewItem Header="Item 0" IsDropAllowed="False">
        <telerikNavigation:RadTreeViewItem Header="Item 0.1" IsDropAllowed="True" />
        <telerikNavigation:RadTreeViewItem Header="Item 0.2" IsDropAllowed="True" />
    </telerikNavigation:RadTreeViewItem>
    <telerikNavigation:RadTreeViewItem Header="Item 1" IsDropAllowed="True">
        <telerikNavigation:RadTreeViewItem Header="Item 1.0" IsDropAllowed="False" />
        <telerikNavigation:RadTreeViewItem Header="Item 1.1" IsDropAllowed="True" />
    </telerikNavigation:RadTreeViewItem>
    <telerikNavigation:RadTreeViewItem Header="Item 2" IsDropAllowed="True" />
    <telerikNavigation:RadTreeViewItem Header="Item 3" IsDropAllowed="True" />
</telerikNavigation:RadTreeView>

Let me know if this is of any help and whether it fits your scenario.

Kind regards,
Kiril Stanoev
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.
Tags
TreeView
Asked by
sum sum
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or