
Jeff Bradshaw
Top achievements
Rank 1
Jeff Bradshaw
asked on 04 Nov 2010, 08:58 PM
I have a treeeview and I need to be able to remove a node from it by dragging the node out of the treeview and into a datagrid. I can't figure out how to start the drag and drop actions - what events are fired?
Can anybody help please?
TIA - Jeff.
Can anybody help please?
TIA - Jeff.
6 Answers, 1 is accepted
0

Richard Slade
Top achievements
Rank 2
answered on 05 Nov 2010, 12:41 PM
Hi Jeff,
The controls aren't specifically designed to allow drag and drop between different controls and I guess when dragging to a RadGridView you would need to perform some additional binding or adding of rows when dragging a node to it.
However, the controls use the standard windows forms drag and drop events, which you can find out more about at this link
Hope that helps
Richard
The controls aren't specifically designed to allow drag and drop between different controls and I guess when dragging to a RadGridView you would need to perform some additional binding or adding of rows when dragging a node to it.
However, the controls use the standard windows forms drag and drop events, which you can find out more about at this link
Hope that helps
Richard
0

Jeff Bradshaw
Top achievements
Rank 1
answered on 05 Nov 2010, 01:23 PM
Actually the issue seems to be that I can't get the drag to start in the treeview. Any help there?
0

Richard Slade
Top achievements
Rank 2
answered on 05 Nov 2010, 01:30 PM
Hi Jeff,
To get the drag going, try this..
let me know if that helps
Richard
To get the drag going, try this..
Private
Sub
TreeView_MouseDown(
ByVal
sender
As
System.
Object
, _
ByVal
e
As
System.Windows.Forms.MouseEventArgs)
Handles
TreeView.MouseDown
If
TreeView.SelectedNodes.Count > 0
Then
Dim
text
As
String
= TreeView.SelectedNode.Text
TreeView.SelectedNode =
Nothing
TreeView.Cursor = Cursors.Arrow
TreeView.DoDragDrop(text, DragDropEffects.Copy
Or
DragDropEffects.Move)
End
If
End
Sub
let me know if that helps
Richard
0

Richard Slade
Top achievements
Rank 2
answered on 09 Nov 2010, 03:26 PM
Hi Jeff,
Did this help? If so, please remember to mark as answer.
Otherwise, let me know if you need anything else
Richard
Did this help? If so, please remember to mark as answer.
Otherwise, let me know if you need anything else
Richard
0
Hi Jeff,
Thank you for writing.
Richard's suggestion is correct, I just wanted to add one link to a help article regarding the process of working with RadTreeView and the Drag and Drop operations.
I hope you find this information helpful. Should you need any further assistance, do not hesitate to write back.
Sincerely yours,
Stefan
the Telerik team
Thank you for writing.
Richard's suggestion is correct, I just wanted to add one link to a help article regarding the process of working with RadTreeView and the Drag and Drop operations.
I hope you find this information helpful. Should you need any further assistance, do not hesitate to write back.
Sincerely yours,
Stefan
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
Hello guys,
Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out. For more information on our latest release refer to this blog post.
Best wishes,
Stefan
the Telerik team