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
935
Menu Right Click Record on Grid
posted

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.

Parents
  • 138253
    Verified Answer
    Offline posted

    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 DependencyObjecttypeof(DataRecordPresenter), trueas DataRecordPresenter).Record;
    
     

    Please let me know if this helps you or you need further assistance on this matter.

    Looking forward for your reply.

Reply Children
No Data