Hi,
What is the best way of getting the row data object from a xamgrid in right mouse up event?
Thanks
Jim
Hello Jim,
The best way would be to handle the XamGrid's PreviewMouseRightButtonDown event, instantiate a new CellControl via the Infragistics Utilities class, and reference Cell.Row.Data.
eg.
private void xg1_PreviewMouseRightButtonDown(object sender, MouseButtonEventArgs e)
{
CellControl cell = Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(CellControl), true) as CellControl;
var rowDetails = cell.Cell.Row.Data;
}
Let me know if you have any questions.
Thank you, that was exactly what I needed.