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 feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
That worked, thanks
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
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.