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.
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;
I just replaced a XamDataGrid with XamDataCards control and it works correctly.
So is this a bug with the datacard? or does someone have another idea? Do i need to submit this as a bug?