For our project, we described to create a custom DragCue class that extends from TreeViewDragCue. Only purpose at this point was because of the name and for it to make sense from a development perspective. As an example, I created a class like this:
I used it in my OnDragQuery event for my RadTreeView (using the RadDragAndDropManager) in the following fashion:
however, when I do the following in my OnDropQuery event based on the TreeView, I end up getting a NULL value for the DragCue when I do the following:
MyDragCue cue = e.Options.DragCue as MyDragCue;
Yet, I have no problem, if I do the following: TreeViewDragCue cue = e.Options.DragCue as TreeViewDragCue;
Thoughts?
Paul
public class MyDragCue : TreeViewDragCue
{
public MyDragCue
()
: base()
{
}
}
I used it in my OnDragQuery event for my RadTreeView (using the RadDragAndDropManager) in the following fashion:
void OnDragQuery(object sender, DragDropQueryEventArgs e)
{
if (e.Options.Status == DragStatus.DragQuery)
{
e.Options.Payload = ctlSystemTreeView.SelectedItem;
//Set up a drag cue
MyDragCue cue = new MyDragCue();
cue.ItemTemplate = ctlSystemTreeView.ItemTemplate;
e.Options.DragCue = cue;
}
e.QueryResult = true;
e.Handled = true;
}
however, when I do the following in my OnDropQuery event based on the TreeView, I end up getting a NULL value for the DragCue when I do the following:
MyDragCue cue = e.Options.DragCue as MyDragCue;
Yet, I have no problem, if I do the following: TreeViewDragCue cue = e.Options.DragCue as TreeViewDragCue;
Thoughts?
Paul