Class DataGridPdfExportExtension
Provides the extensions for exporting SfDataGrid into PDF.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGridConverter
Assembly: Syncfusion.SfDataGridConverter.WinForms.dll
Syntax
public static class DataGridPdfExportExtension
Methods
ExportToPdf(SfDataGrid)
Exports the dataGrid to PDF.
Declaration
public static PdfDocument ExportToPdf(this SfDataGrid sfgrid)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
Returns
Type | Description |
---|---|
PdfDocument | Returns the instance of class PdfDocument. |
ExportToPdf(SfDataGrid, ICollectionViewAdv, PdfExportingOptions)
Exports the dataGrid to PdfGrid.
Declaration
public static PdfDocument ExportToPdf(this SfDataGrid sfgrid, ICollectionViewAdv gridCollectionView, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Returns
Type | Description |
---|---|
PdfDocument | Returns the instance of class PdfDocument. |
ExportToPdf(SfDataGrid, PdfExportingOptions)
Exports the dataGrid to PDF.
Declaration
public static PdfDocument ExportToPdf(this SfDataGrid sfgrid, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Returns
Type | Description |
---|---|
PdfDocument | Returns the instance of PdfDocument. |
ExportToPdf(SfDataGrid, ObservableCollection<Object>, PdfExportingOptions)
Exports the dataGrid to PDF.
Declaration
public static PdfDocument ExportToPdf(this SfDataGrid sfgrid, ObservableCollection<object> selectedItems, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Specifies the selected items. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Returns
Type | Description |
---|---|
PdfDocument | Returns the instance of class PdfDocument. |
ExportToPdf(SfDataGrid, String, ICollectionViewAdv, PdfExportingOptions)
Declaration
public static void ExportToPdf(this SfDataGrid sfgrid, string pdfFileName, ICollectionViewAdv gridCollectionView, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
System.String | pdfFileName | |
ICollectionViewAdv | gridCollectionView | |
PdfExportingOptions | pdfExportingOptions |
ExportToPdf(SfDataGrid, String, ObservableCollection<Object>, PdfExportingOptions)
Exports the selected items of DataGrid to Pdf document with the file name.
Declaration
public static void ExportToPdf(this SfDataGrid sfgrid, string pdfFileName, ObservableCollection<object> selectedItems, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
System.String | pdfFileName | |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Specifies the selected items. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Remarks
Only the DataRow is exported, other than data row is not exported (GroupSummary, CaptionSummary, TableSummary).
ExportToPdfGrid(SfDataGrid, ICollectionViewAdv, PdfExportingOptions)
Exports the dataGrid to PdfGrid.
Declaration
public static PdfGrid ExportToPdfGrid(this SfDataGrid sfgrid, ICollectionViewAdv gridCollectionView, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
ICollectionViewAdv | gridCollectionView | Specifies the SfDataGrid view. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Returns
Type | Description |
---|---|
PdfGrid | Returns the instance of PdfGrid. |
ExportToPdfGrid(SfDataGrid, ObservableCollection<Object>, PdfExportingOptions)
Exports the dataGrid to PdfGrid.
Declaration
public static PdfGrid ExportToPdfGrid(this SfDataGrid sfgrid, ObservableCollection<object> selectedItems, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
System.Collections.ObjectModel.ObservableCollection<System.Object> | selectedItems | Specifies the selected items. |
PdfExportingOptions | pdfExportingOptions | Specifies the instance of class |
Returns
Type | Description |
---|---|
PdfGrid | Returns the instance of class PdfGrid. |