This question is locked. New answers and comments are not allowed.
Hi,
Im trying to change the drag/drop tooltip and I followed this post: http://www.telerik.com/help/silverlight/radtreeview-how-to-set-drag-cue-feedback-deny-drop.html
Our scenario is allow client to drop item before/after another item but we need to change the tooltip message, so my code is:private void OnDropQuery( object sender, DragDropQueryEventArgs e )
{
var destination = e.Options.Destination as RadTreeViewItem;
var cue = e.Options.DragCue as TreeViewDragCue;
// Do not allow dropping inside items which start with "B", only handle cases
// where a drop is currently allowed.
if ( destination != null
&& e.Options.Status == DragStatus.DropDestinationQuery
&& e.QueryResult == true
&& destination.DropPosition == DropPosition.Before
&& ( destination.Item as MyViewModel ).Title.StartsWith( "B" ) )
{
// Debying a drop will set the cue.IsDropPossible = false
e.QueryResult = true;
// We only need to give a reason:
cue.DragActionContent = "Can drop before Bs, hahaha";
}
}
Howevere, it never worked when e.QueryResult = true. Could you guys help me with this one, please? Doe it work in your end or there is something at my end is wrong?
Regards
Bill
Im trying to change the drag/drop tooltip and I followed this post: http://www.telerik.com/help/silverlight/radtreeview-how-to-set-drag-cue-feedback-deny-drop.html
Our scenario is allow client to drop item before/after another item but we need to change the tooltip message, so my code is:private void OnDropQuery( object sender, DragDropQueryEventArgs e )
{
var destination = e.Options.Destination as RadTreeViewItem;
var cue = e.Options.DragCue as TreeViewDragCue;
// Do not allow dropping inside items which start with "B", only handle cases
// where a drop is currently allowed.
if ( destination != null
&& e.Options.Status == DragStatus.DropDestinationQuery
&& e.QueryResult == true
&& destination.DropPosition == DropPosition.Before
&& ( destination.Item as MyViewModel ).Title.StartsWith( "B" ) )
{
// Debying a drop will set the cue.IsDropPossible = false
e.QueryResult = true;
// We only need to give a reason:
cue.DragActionContent = "Can drop before Bs, hahaha";
}
}
Howevere, it never worked when e.QueryResult = true. Could you guys help me with this one, please? Doe it work in your end or there is something at my end is wrong?
Regards
Bill