We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to customize cell value while exporting the SfDataGrid into Excel and PDF?

We can customize a particular cell value while exporting the SfDataGrid to Excel and PDF by handling DataGridPdfExportingController.CellExporting event.

Export to PDF

The below code helps to customize a cell value while exporting the SfDataGrid to PDF. DependencyService.Get<ISave>() and DependencyService.Get<ISaveWindowsPhone> are interfaces that help you to save the exported grid in various platform projects.

 

Screenshot

C:\Users\indhumathy.malayappa\AppData\Local\Microsoft\Windows\INetCacheContent.Word\image1.png

 

Export to Excel

The below code helps to customize a cell value while exporting the SfDataGrid to Excel. Like PDF exporting, we should add the interfaces implementation for excel exporting also.

 

Screenshot

 

C:\Users\indhumathy.malayappa\AppData\Local\Microsoft\Windows\INetCacheContent.Word\images3.png

 

Interfaces Implementation

 

Platform Specific Interface Implementation

Android

 

IOS

 

UWP

 

Sample Link

How to customizing the cell value while exporting the SfDatagrid to PDF and Excel

Article ID: Published Date: Last Revised Date: Platform: Control:
7221 01/10/2017 01/10/2017 Xamarin.iOS SfDataGrid
Did you find this information helpful?
Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.