Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
635
Getting row data object on right mouse click
posted

Hi,

What is the best way of getting the row data object from a xamgrid in right mouse up event?

Thanks

Jim

Parents
  • 29105
    Suggested Answer
    Offline posted

    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.

Reply Children