Hello,
I need to know above wich cell of a xamdatagrid is the mouse cursor when drop event occurs.
Using e.GetPosition(myDatagrid), I get the position of the cursor. I tried to deduce the targeted column by comparing sum of fields width againts cursorpos.X but it doesn't work when the width is '*'.
For other purposes, cellclickaction="SelectRecord" so that i can't use this feature to find the cell
Sorry, I forgot to close this case.
Krasimir have already given the same answer for my support case
Hi,
This code should allow you to get the cell the mouse is over during the drop event.
DependencyObject source = e.OriginalSource as DependencyObject;
if (source == null) return;
CellValuePresenter cvp =
Infragistics.Windows.Utilities.GetAncestorFromType(source, typeof(CellValuePresenter), true) as CellValuePresenter;
if (cvp == null) return;
MessageBox.Show(cvp.Value.ToString());