Hi, I have a XamGrid and a button to export the grid to excel. I would like to include the button as part of the XamGrid itself, so I added it to the PagerControl section of my XamGrid, using a resource dictionary. Is there a way to handle the click event from this button that is defined in my resource dictionary?I would prefer not to duplicate the code to export to excel on every screen that has a XamGrid.
Thanks!Connor
Hello Connor,
Thank you for your feedback. I am glad that you resolved your issue.
That's what I needed, thanks!
Thank you for contacting our community.
I have been looking into your post and what I can suggest you is implementing a custom ICommand class in order to define a command for the click event of the button. I have made a sample project to represent this approach where I retemplated the PagerCellControl and added the button in its content.
Please have a look at the attached project and let me know if you have any other questions or concerns on the matter.