I'm trying to get the underlying object (in this case a Model.Topic) for the e.TargetDropItem of a drag drop operation.
... targetTopic is null.
How can I get the actual object bound to the node that was the target of the drop?
I posted this in the wrong forum. It should be in the WPF forum.
private void RadTreeView_DragEnded(object sender, Telerik.Windows.Controls.RadTreeViewDragEndedEventArgs e) |
{ |
object droppedTopics = e.DraggedItems; |
object targetDropItem = e.TargetDropItem; |
Model.Topic targetTopic = targetDropItem as Model.Topic; |
foreach (object droppedTopic in e.DraggedItems as Collection<object>) |
{ |
Model.Topic sourceTopic = droppedTopic as Model.Topic; |
targetTopic.ParentTopicId = sourceTopic.ID; |
} |
} |
The problem is that after the line...
Model.Topic targetTopic = targetDropItem as Model.Topic; |
... targetTopic is null.
How can I get the actual object bound to the node that was the target of the drop?
I posted this in the wrong forum. It should be in the WPF forum.