I'm trying to update a record based on a drag drop, so far the closest thing i've been able to find to determing which record is to be update is by looping through all the records and trying to determin is the records/cards isMouseover is actiave. However both methods i've tried the ismouseover is always false. Is that a bug? Is there another way to determine what card an item was dropped on?
Dim item As Infragistics.Windows.DataPresenter.DataRecordPresenter
item = Infragistics.Windows.DataPresenter.RecordPresenter.FromRecord(dvProjectWbs.Records(i))
item.IsMouseOver
or
dvProjectWbs.Records(1).DataPresenter.IsMouseOver
No, this is not a bug. These properties are disabled when there is an active drag-drop operation. You can take a look at this approach here where this is taken care of.
Hello,
I have a similar issue. I'm trying to drag from a XamDataTree to a XamdDataGrid. I am using the drag / drop manager, and MS prism so I do not want to write code-behind in my view. When I capture the drop event and examine the Infragistics.DragDrop.DropEventArgs object, I see the XamDataGrid in the DropTargetElements. This does not help me to determine where to insert the data in my viewmodel. When I drop on a XamDataTree, I get the UI element onto which the drop occurred. How do I know where the drop occurred in the XamDataGrid? I would expect the Drag/Drop Framework to allow me to do this.
Thanks,
Chris
I did, and when looking through the code, it looked like Jason was using a datapresenter object to determine where the mouse was over relative to record index. Did i miss thing? Or is he doing something else to determine the record location to therefore insert the record before?
/// <summary>
Returns the index of the XDG underneath the
drag cursor, or -1 if the cursor is not over an item.
</summary>
{
get
int
index = -1;
.xamDataGrid.Records.Count; ++i)
.GetXDGItem(i);
.IsMouseOver(item))
index = i;
;
}
index;