My problem is that can I only allow the users to add the draged node as a sibling and disable the functionality that the users can add the node as a child? (perhaps should do something to the arrow point and the dashed line...?)
11 Answers, 1 is accepted
You could try handling the DragEnding event of RadTreeView and cancel the drag and drop operation if a node is going to be dropped as a child of another:
void radTreeView1_DragEnding(object sender, RadTreeViewDragCancelEventArgs e) |
{ |
if (e.Direction == Telerik.WinControls.ArrowDirection.Right) |
{ |
e.Cancel = true; |
} |
} |
Don't hesitate to contact us if you have other questions.
Jordan
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Unfortunately, with the current implementation that behavior cannot be modified. We will consider changing this if demand for this feature rises.
Best wishes,
Jordan
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can hide the arrow by setting the ShowFeedbackForm property of RadTreeView to false:
this.radTreeView1.ShowFeedbackForm = false;
Kind regards,
Jordan
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
I am also looking for the above features...
My problem is that can I only allow the users to add the draged node as a sibling and disable the functionality that the users can add the node as a child? (perhaps should do something to the arrow point and the dashed line...?)
We have not yet rafactored RadTreeView Drag & Drop logic. Since you are the third person to ask for extensions recently, we are considering the features requested so far. The new drag & drop functionality will most likely be available for Q2 2010. Write again if you have other questions.
Best wishes,
Victor
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.
do I have the same problem?
Let me describe the scenario:
There is a RadListBox and a RadTreeView. You can drag ListBoxItems to the treeview and drop them on some specific RadTreeNodes. Whether you can drop an item or not is handled in RadTreeView´s DragOver event - so the DragDropEffect is set to Move or None.
Everything´s fine so far.
In our application you also should be able to Drag Drop RadTreeNodes inside the treeview with almost the same handling, but the DragOver event is not raised. Is there another event / way to get this working??
Greetings,
Thomas
Thank you for writing.
There must be something in your code that prevents the DragOver event from firing. DragOver is an event declared on the Control class level, RadTreeView has no code which can prevent it from firing. If you are using RadTreeView's drag and drop, however, you must use only them, they do not work with the standard OLE drag & drop mechanism.
If you still believe that RadTreeView is misbehaving in some way, I would kindly ask you to post a code snipped which demonstrates what you are doing so that I may assist you further. The other available option for you is to open a new support ticket and send me a sample project.
Sincerely yours,Victor
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.
EDIT: Just tried to do the drag and drop the way you would with std window events but it does'nt really work because the ItemDrag only fires when you set the allowdragdrop property which then seems to kick in the pre-wired drag and drop functionality (which I don't want because it makes it look like you can drag items to be siblings where they should not be!)
Thank you for the feedback.
We are aware that the mixture of RadTreeView's drag and drop properties and events and the Windows OLE mechanism is a source of confusion. The two approaches simply do not work together and as a rule of thumb you should always use either one or the other, never both mechanisms. We will consider extending RadTreeView's drag and drop to support more visual cues that reflect the state of the drag and drop operation.
Write again if you have questions or if you need assistance with our controls.
Victor
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.