I have a requirement to modify the GroupByAreaField to include an "X" button that will remove it as a Group By field. Currently, the user has to to drag a GroupByAreaField and drop it outside of the Group By Area to remove it as a Group By field. It would be more convenient for them to simply click a part of the GroupByAreaField to remove it.
What is the recommended approach to implement this feature?
Kind Regards,
Hello Albert,
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically I copied the default Style of the LabelPresenter and added a Button to its Template. I bound the button visibility to a Property called IsInGroupBy which is true when the LabelPresenter is in GroupByArea. I also used a command for the button to remove the grouped Field. Please let me know if this helps you or you have further questions on this matter.
Looking forward for your reply.
Thanks, Stefan, that is just what I needed! Where (which file from the Infragistics install) did you copy the default Style of the LabelPresenter from?
The default Styles of the XamDataGrid are located here by default:
C:\Program Files (x86)\Infragistics\2013.2\WPF\DefaultStyles\DataPresenter\DataPresenterAero_Express.xaml file
Great, thanks, Stefan.
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.