Hello -- I'm trying to get a context menu to pop when the user right-clicks on a GroupByRecord.
Also, I will build the contextmenu by passing one of the ChildRecords of the GroupByRecord. Is there any easy way to do this? My other contextmenus are popped from the PreviewMouseRightButtonDown event... I've attached a sample project for clarity. Basically I want the non-null contextmenu to pop when user groups on an item and right-clicks the grouped item. Handling a double-click event would be preferred as well! Thanks.
Hello Daniel,
You can use the following code in order to get the Field that the "grec" GroupByRecordPresenter is grouped by:
Field f = (grec.Record as GroupByRecord).GroupByField;
Hope this helps you.
Is there any way to know which column grouping the GroupByRecordPresenter.Record corresponds to? I don't see a property that suggests which grouping the it is linked to.
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.
Outstanding! Thanks again Stefan :). This is exactly the functionality I need.
Thank you for your post. I have been looking into it and the sample you have uploaded and I modified it. So it has the functionality you want. Basically when you GroupBy the visual elements are not DataRecordPresneters, but GroupByRecordPresenters. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.