Class DataGridToPdfConverter
Provides the base implementation to export the SfDataGrid to PDF.
Inheritance
Inherited Members
Namespace: Syncfusion.WinForms.DataGridConverter
Assembly: Syncfusion.SfDataGridConverter.WinForms.dll
Syntax
public class DataGridToPdfConverter
Remarks
It provides the set of public and virtual methods to customize the rows and columns of PDFGrid.
Constructors
DataGridToPdfConverter()
Declaration
public DataGridToPdfConverter()
Methods
ExportDetailsViewDataGridToPdf(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions, Group)
Declaration
protected virtual void ExportDetailsViewDataGridToPdf(SfDataGrid sourceDataGrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sourceDataGrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions | |
Group | group |
ExportDetailsViewToPDF(SfDataGrid, PdfGrid, PdfExportingOptions, Object, IPropertyAccessProvider, Group)
Declaration
protected virtual void ExportDetailsViewToPDF(SfDataGrid parentDataGrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, object rec, IPropertyAccessProvider propertyAccessProvider, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | parentDataGrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
System.Object | rec | |
IPropertyAccessProvider | propertyAccessProvider | |
Group | group |
ExportGroupCaptionToPdf(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions, Group)
Declaration
protected virtual void ExportGroupCaptionToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions | |
Group | group |
ExportGroupToPdf(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions, Group)
Declaration
protected virtual void ExportGroupToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions | |
Group | group |
ExportHeadersToPdf(SfDataGrid, PdfGrid, PdfExportingOptions)
Declaration
protected virtual void ExportHeadersToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions |
ExportImageToPdf(SfDataGrid, PdfGridCell, PdfExportingOptions, Object, IPropertyAccessProvider, GridColumn)
Declaration
protected virtual void ExportImageToPdf(SfDataGrid sfgrid, PdfGridCell pdfGridCell, PdfExportingOptions pdfExportingOptions, object record, IPropertyAccessProvider propertyAccessProvider, GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGridCell | pdfGridCell | |
PdfExportingOptions | pdfExportingOptions | |
System.Object | record | |
IPropertyAccessProvider | propertyAccessProvider | |
GridColumn | column |
ExportRecordCellToPdf(SfDataGrid, PdfGridCell, PdfExportingOptions, Object, IPropertyAccessProvider, GridColumn)
Declaration
protected virtual void ExportRecordCellToPdf(SfDataGrid sfgrid, PdfGridCell pdfGridCell, PdfExportingOptions pdfExportingOptions, object record, IPropertyAccessProvider propertyAccessProvider, GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGridCell | pdfGridCell | |
PdfExportingOptions | pdfExportingOptions | |
System.Object | record | |
IPropertyAccessProvider | propertyAccessProvider | |
GridColumn | column |
ExportRecordsToPdf(SfDataGrid, PdfGrid, PdfExportingOptions, IEnumerable, IPropertyAccessProvider, Group)
Declaration
protected virtual void ExportRecordsToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, IEnumerable records, IPropertyAccessProvider propertyAccessProvider, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
System.Collections.IEnumerable | records | |
IPropertyAccessProvider | propertyAccessProvider | |
Group | group |
ExportRecordToPdf(SfDataGrid, PdfGrid, PdfExportingOptions, Object, IPropertyAccessProvider, Group)
Declaration
protected virtual void ExportRecordToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, object record, IPropertyAccessProvider propertyAccessProvider, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
System.Object | record | |
IPropertyAccessProvider | propertyAccessProvider | |
Group | group |
ExportStackedHeaderToPdf(SfDataGrid, PdfGrid, PdfExportingOptions, StackedHeaderRow)
Declaration
protected virtual void ExportStackedHeaderToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, StackedHeaderRow stackedHeaderRow)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
StackedHeaderRow | stackedHeaderRow |
ExportSummariesToPdf(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions, Group)
Declaration
protected virtual void ExportSummariesToPdf(SfDataGrid sfGrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions, Group group)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfGrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions | |
Group | group |
ExportSummaryCellToPdf(SfDataGrid, PdfGridCell, PdfExportingOptions, ExportCellType, String, Object, String)
Declaration
protected virtual void ExportSummaryCellToPdf(SfDataGrid sfGrid, PdfGridCell pdfGridCell, PdfExportingOptions pdfExportingOptions, ExportCellType exportCellType, string summaryDisplayText, object exportNodeEntry, string columnName)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfGrid | |
PdfGridCell | pdfGridCell | |
PdfExportingOptions | pdfExportingOptions | |
ExportCellType | exportCellType | |
System.String | summaryDisplayText | |
System.Object | exportNodeEntry | |
System.String | columnName |
ExportSummaryRecordToPdf(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions, Group, SummaryRecordEntry, ExportCellType, PdfGridCellStyle)
Declaration
protected virtual void ExportSummaryRecordToPdf(SfDataGrid sfGrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions, Group group, SummaryRecordEntry summaryRecordEntry, ExportCellType cellType, PdfGridCellStyle cellStyle)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfGrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions | |
Group | group | |
SummaryRecordEntry | summaryRecordEntry | |
ExportCellType | cellType | |
PdfGridCellStyle | cellStyle |
ExportToPdf(SfDataGrid)
Exports the dataGrid to PDF.
Declaration
public virtual PdfDocument ExportToPdf(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 virtual PdfDocument ExportToPdf(SfDataGrid sfgrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
ICollectionViewAdv | view | 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 virtual PdfDocument ExportToPdf(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 virtual PdfDocument ExportToPdf(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 virtual void ExportToPdf(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 virtual void ExportToPdf(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 virtual PdfGrid ExportToPdfGrid(SfDataGrid sfgrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | Specifies the SfDataGrid. |
ICollectionViewAdv | view | 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 virtual PdfGrid ExportToPdfGrid(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. |
ExportUnboundRowCellToPdf(SfDataGrid, PdfGridCell, PdfExportingOptions, GridUnboundRow, GridColumn)
Declaration
protected virtual void ExportUnboundRowCellToPdf(SfDataGrid sfgrid, PdfGridCell pdfGridCell, PdfExportingOptions pdfExportingOptions, GridUnboundRow unBoundRow, GridColumn column)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGridCell | pdfGridCell | |
PdfExportingOptions | pdfExportingOptions | |
GridUnboundRow | unBoundRow | |
GridColumn | column |
ExportUnboundRowsToPdf(SfDataGrid, PdfGrid, PdfExportingOptions, VerticalPosition, Boolean, ObservableCollection<GridUnboundRow>)
Declaration
protected virtual void ExportUnboundRowsToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, VerticalPosition position, bool belowSummary, ObservableCollection<GridUnboundRow> unBoundRows = null)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
VerticalPosition | position | |
System.Boolean | belowSummary | |
System.Collections.ObjectModel.ObservableCollection<GridUnboundRow> | unBoundRows |
ExportUnboundRowToPdf(SfDataGrid, PdfGrid, PdfExportingOptions, GridUnboundRow)
Declaration
protected virtual void ExportUnboundRowToPdf(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions, GridUnboundRow unBoundRow)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions | |
GridUnboundRow | unBoundRow |
InitializeCellStyle(SfDataGrid, PdfGrid, ICollectionViewAdv, PdfExportingOptions)
Declaration
protected virtual void InitializeCellStyle(SfDataGrid sfgrid, PdfGrid pdfGrid, ICollectionViewAdv view, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
ICollectionViewAdv | view | |
PdfExportingOptions | pdfExportingOptions |
SetColumnWidth(SfDataGrid, PdfGrid, PdfExportingOptions)
Declaration
protected virtual void SetColumnWidth(SfDataGrid sfgrid, PdfGrid pdfGrid, PdfExportingOptions pdfExportingOptions)
Parameters
Type | Name | Description |
---|---|---|
SfDataGrid | sfgrid | |
PdfGrid | pdfGrid | |
PdfExportingOptions | pdfExportingOptions |