Hi,
In the GridViewDragDropBehavior in the OnDragOver event handler, there does not seem to be a way to detect the dragged over row/item. I am trying highlight the dragged over row differently depending on the content of the dragged over row. So, for example, if row 1 cell 1 contains the words "Not on me" I would highlight the row with a red backcolor until they moved off of it and disallow drop. In the examples that I've seen they always show the CurrentDraggedOverItem to be the this.AssociatedObject, which is always the gridview itself. I want the specific row with that is being dragged over. Can I get there from here?
Thanks .... Ed
private void OnDragOver(object sender, Telerik.Windows.DragDrop.DragEventArgs e)
{
var data = e.Data as DataObject;
if (data != null && data.ContainsFileDropList())
{
return;
}
var draggedItem = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");
var itemsType = (this.AssociatedObject.ItemsSource as IList).AsQueryable().ElementType;
if (draggedItem.GetType() != itemsType)
{
e.Effects = DragDropEffects.None;
}
var dropDetails = DragDropPayloadManager.GetDataFromObject(e.Data, "DropDetails") as DropIndicationDetails;
dropDetails.CurrentDraggedOverItem = this.AssociatedObject;
dropDetails.CurrentDropPosition = Telerik.Windows.Controls.DropPosition.Inside;
e.Handled = true;
}