Export To PDF In WPF Datagrid (Sfdatagrid)

Sample date Updated on May 19, 2026
datagrid exporttopdf pdf-export pdf-exporting wpf

The WPF DataGrid SfDataGrid provides support to export data to PDF file. It also provides support for grouping, filtering, sorting, paging, unbound rows, merged cells, stacked headers and details View while exporting.

The following assemblies needs to be added for exporting to PDF file.

  • Syncfusion.SfGridConverter.WPF
  • Syncfusion.Pdf.Base

For NuGet package, have to install Syncfusion.DataGridExcelExport.WPF package. For more details refer this UG link.

You can export SfDataGrid to PDF by using the following extension methods present in the Syncfusion.UI.Xaml.Grid.Converter namespace.

C#

using Syncfusion.UI.Xaml.Grid.Converter;
var document = dataGrid.ExportToPdf();
document.Save("Sample.pdf");

Note: SfDataGrid exports data to PDF file by using Essential PDF. You can refer PDF documentation for manipulating.

Documentation

Take a moment to peruse the WPF SfDataGrid PDF Export Documentation, where you can find about pdf exporting with examples.

Up arrow