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

Treeview show Arrow (GenerateArrowCue) while dragging

1 Answer 44 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
anwar
Top achievements
Rank 1
anwar asked on 18 Sep 2009, 04:35 PM
Hello,

I am trying to show the arrow (generatearrowcue) when the user drag and drop the tree node  in to list box. Here is my code snippet and the OnDragQuery event is not firing. Can you please help me what i am doing wrong.

this

 

.tvMetadata.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery));

 

 

this.tvMetadata.AddHandler(RadDragAndDropManager.DragInfoEvent, new EventHandler<DragDropEventArgs>(OnDragInfo));

 

 

void OnDragInfo(object sender, DragDropEventArgs e)

 

{

 

if (e.Options.Status == DragStatus.DragComplete)

 

{

e.Handled =

true;

 

}

}

 

void OnDragQuery(object sender, DragDropQueryEventArgs e)

 

{

 

if (e.Options.Status == DragStatus.DragQuery)

 

{

e.Options.ArrowCue =

RadDragAndDropManager.GenerateArrowCue();

 

}

}

1 Answer, 1 is accepted

Sort by
0
Miroslav
Telerik team
answered on 23 Sep 2009, 08:00 AM
Hi anwar,

I am sorry for the delayed reply,

The TreeView handles the DragDrop events and therefore you need to register for the events using the overloaded method that lets you handle handled events as well:

 

 

treeView.AddHandler(RadDragAndDropManager.DragQueryEvent, new EventHandler<DragDropQueryEventArgs>(OnDragQuery), true); 

This way your handler will be called.

Hopefully this will work for you,

Sincerely yours,
Miroslav
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
anwar
Top achievements
Rank 1
Answers by
Miroslav
Telerik team
Share this question
or