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
1240
Any way to export only selected records to Excel?
posted

I had no problem getting the export to Excel from XamDataGrid working. Your video and samples were perfect.  But it always exports everything.

Is there any way to tell it to only export the selected records?

I did try to handle the DataPresenterExcelExporter.RecordExporting event and cancel if the record is not selected, but for some reason every record has IsSelected == false when this event is raised.

Thanks,

Mike

P.S.This is with 9.2 (WPF of course).

Parents
No Data
Reply
  • 54937
    Offline posted

    The record instances in the print/export grid are not the same as the record instances used by the display grid. The selection is not copied over during the print/export process. However, you can use the GetAssociatedRecord method to get the associated record from the display grid and check its state information.

Children