A possible reason for the reported behavior is that the DragDropEffects
is not included in the AllowedEffects
. Please note that you are allowed to chose between the options that are present in the AllowedEffects
property, only. If you choose not existing option, the UI will not respect that setting.
Please note that the AllowedEffects
can be set only in the DragInitialized
handler. However, if you need to notify the user that a drop operation is not possible you can subscribe to the DragOver
event of the RadTreeView
control and access the TreeViewDragDropOptions
. After that you will be able to check the DropPosition
properties and based on them you can decide if the drop operation is allowed or not.
In case that you want to restrict a drop operation you can set the DropAction
property to None
. This will prevent the drop operation. In order to update the drag visual you can call the UpdateDragVisual()
method. By doing so the mouse cursor will be changed. You can use the following code:
sender, Telerik.Windows.DragDrop.DragEventArgs e)
var options = DragDropPayloadManager.GetDataFromObject(e.Data, TreeViewDragDropOptions.Key)
options.DropAction = DropAction.None;
Please give this approach a try and let me know if it works for you.
Pavel R. Pavlov
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>