I do the menu at the grid level, and subscribe to the MenuOpening event to actually decide which menu items are visible. I would like to know which record the mouse button is on when the right click is done. I can get active record, but that is not a very good way to do this.
Hello,
Thank you for your post. I have been looking into it and I can suggest handle the XamDataGrid’s PreviewMouseRightButtonDown event and use the following code in its handler inorder to achieve your goal:
Record r =(Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(DataRecordPresenter), true) as DataRecordPresenter).Record;
Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
That worked, thanks