I want to support dragging a RadTreeNode out of a TreeView, but do not want to allow users to drag and drop nodes between other nodes in the same tree.
The above code works great as long as I have the AllowDragDrop enabled on the treeview, but then again, it causes problems with nodes being able to be dragged around.
Any help would be appreciated.
this.radTreeView1.ItemDrag += new RadTreeView.ItemDragHandler(radTreeView1_ItemDrag); |
RadTreeNode draggingItem = e.Node; |
if (GetTagValue(draggingItem.Tag.ToString(), "Type") == "Document") |
{ |
DataObject dragData = GetDragDropFile(draggingItem); |
if (dragData != null) |
{ |
this.DoDragDrop(dragData, DragDropEffects.Copy); |
} |
else |
{ |
MessageBox.Show("There was a problem with this file. Please check to make sure you have access, and that you have recently refreshed the Outlook View.", "Error...", MessageBoxButtons.OK, MessageBoxIcon.Error); |
} |
} |
The above code works great as long as I have the AllowDragDrop enabled on the treeview, but then again, it causes problems with nodes being able to be dragged around.
Any help would be appreciated.