Class GridViewPdfExport
GridViewPdfExport is an exporting API, allowing to export RadGridView to PDF format, utilizing the Document Processing Libraries.
Inheritance
Inherited Members
Namespace: Telerik.WinControls.Export
Assembly: Telerik.WinControls.GridView.dll
Syntax
public class GridViewPdfExport
Constructors
GridViewPdfExport(RadGridView)
Initializes a new instance of the GridViewPdfExport class.
Declaration
public GridViewPdfExport(RadGridView radGridView)
Parameters
Rad The grid to export. |
Fields
DateExportedString
Date when the exporting was started.
Declaration
public const string DateExportedString = "[Date Exported]"
Field Value
System.
|
DatePrintedString
Obsolete. Use DateExportedString instead.
Declaration
[Obsolete("Obsolete. Use DateExportedString instead.")]
public const string DatePrintedString = "[Date Exported]"
Field Value
System.
|
LogoString
Allows to add logo to the header or footer.
Declaration
public const string LogoString = "[Logo]"
Field Value
System.
|
PageNumberString
Number of the current page
Declaration
public const string PageNumberString = "[Page #]"
Field Value
System.
|
TimeExportedString
Time when the printing was started.
Declaration
public const string TimeExportedString = "[Time Exported]"
Field Value
System.
|
TimePrintedString
Obsolete. Use DateExportedString instead.
Declaration
[Obsolete("Obsolete. Use TimeExportedString instead.")]
public const string TimePrintedString = "[Time Exported]"
Field Value
System.
|
TotalPagesString
Total number of pages
Declaration
public const string TotalPagesString = "[Total Pages]"
Field Value
System.
|
UserNameExportedString
Username associated with the current thread (the current Windows login))
Declaration
public const string UserNameExportedString = "[User Name]"
Field Value
System.
|
UserNamePrintedString
Obsolete. Use UserNameExportedString instead.
Declaration
[Obsolete("Obsolete. Use UserNameExportedString instead.")]
public const string UserNamePrintedString = "[Time Exported]"
Field Value
System.
|
Properties
ChildViewExportMode
Gets or sets the child view export mode.
Declaration
public ChildViewExportMode ChildViewExportMode { get; set; }
Property Value
Child The child view export mode. |
ExportGroupedColumns
Gets or sets a value indicating whether grouped columns should be exported. Default value is true.
Declaration
public bool ExportGroupedColumns { get; set; }
Property Value
System.
|
ExportHeaderRowOnEachPage
Gets or sets a value indicating whether the header row should be exported on each page. Default value is true.
Declaration
public bool ExportHeaderRowOnEachPage { get; set; }
Property Value
System.
|
ExportHierarchy
Gets or sets if child rows should be exported.
Declaration
public bool ExportHierarchy { get; set; }
Property Value
System.
|
ExportSettings
Gets or sets export settings.
Declaration
public PdfExportSettings ExportSettings { get; set; }
Property Value
ExportViewDefinition
Gets or sets a value indicating whether to export view definition.
Declaration
public bool ExportViewDefinition { get; set; }
Property Value
System.
|
ExportVisualSettings
Gets or sets a value indicating whether the visual settings should be exported.
Declaration
public bool ExportVisualSettings { get; set; }
Property Value
System.
|
FileExtension
Gets or sets the file extension of the exported file.
Declaration
public string FileExtension { get; set; }
Property Value
System. The file extension. |
FitToPageWidth
Gets or sets a value indicating whether the content of page should fit into the page width. Default value is true.
Declaration
public bool FitToPageWidth { get; set; }
Property Value
System.
|
FooterFont
FooterHeight
HeaderFont
Gets or sets the font of the page header.
Declaration
public Font HeaderFont { get; set; }
Property Value
System.
|
HeaderHeight
Gets or sets the header height.
Declaration
public double HeaderHeight { get; set; }
Property Value
System.
|
HiddenColumnOption
Gets or sets a value indicating how hidden columns are exported.
Declaration
public HiddenOption HiddenColumnOption { get; set; }
Property Value
Hidden The hidden column option. |
HiddenRowOption
Gets or sets a value indicating how hidden rows are exported.
Declaration
public HiddenOption HiddenRowOption { get; set; }
Property Value
Hidden The hidden row option. |
LeftFooter
LeftHeader
Gets or sets the text that will be exported near the upper left corner of the page.
Declaration
public string LeftHeader { get; set; }
Property Value
System.
|
Logo
Gets or sets the header/footer logo.
Declaration
public Image Logo { get; set; }
Property Value
System.
|
LogoAlignment
Gets or sets the alignment of logo image in header/footer.
Declaration
public ContentAlignment LogoAlignment { get; set; }
Property Value
System.
|
LogoLayout
Gets or sets the way the logo is drawn.
Declaration
public LogoLayout LogoLayout { get; set; }
Property Value
MiddleFooter
MiddleHeader
Gets or sets the text that will be exported at the top center of the page.
Declaration
public string MiddleHeader { get; set; }
Property Value
System.
|
PageMargins
Gets or Sets the margins of pages that will be exported in millimeters.
Declaration
public Padding PageMargins { get; set; }
Property Value
System.
|
PageSize
Gets or sets the page size in millimeters for the exported file. Default size is 210x297mm(A4 portrait).
Declaration
public SizeF PageSize { get; set; }
Property Value
System.
|
PagingExportOption
Gets or sets a value indicating how the export behaves when paging is enabled.
Declaration
public PagingExportOption PagingExportOption { get; set; }
Property Value
Paging The paging export option. |
RadGridViewToExport
Gets or sets the RadGridView to export.
Declaration
public RadGridView RadGridViewToExport { get; set; }
Property Value
Rad The RadGridView to export. |
ReverseFooterOnEvenPages
ReverseHeaderOnEvenPages
[true] if the LeftHeader and RightHeader should be reversed on even pages, [false] otherwise.
Declaration
public bool ReverseHeaderOnEvenPages { get; set; }
Property Value
System.
|
RightFooter
RightHeader
Gets or sets the text that will be exported near the upper right corner of the page.
Declaration
public string RightHeader { get; set; }
Property Value
System.
|
RowIndent
Gets or sets the indent of group and hierarchy rows.
Declaration
public double RowIndent { get; set; }
Property Value
System.
|
Scale
Gets or sets the document scaling. Default value is 1. For example, scale of 1.2f means 20% size increase.
Declaration
public double Scale { get; set; }
Property Value
System.
|
ShowHeaderAndFooter
SummariesExportOption
Gets or sets a value indicating how summary rows are exported.
Declaration
public SummariesOption SummariesExportOption { get; set; }
Property Value
Summaries The summaries export option. |
Methods
CancelExport()
Cancels current export operation.
Declaration
public void CancelExport()
CancelExportAsync()
Cancels an asynchronous export operation.
Declaration
public void CancelExportAsync()
DetachSparkElemnt()
Declaration
protected virtual void DetachSparkElemnt()
DrawFooter()
DrawHeader()
Exports the header part of the page.
Declaration
protected virtual void DrawHeader()
GetNumberOfPages(ExportGridTraverser)
Declaration
public int GetNumberOfPages(ExportGridTraverser traverser)
Parameters
Export
|
Returns
System.
|
GetRowSize(GridViewRowInfo, TableViewRowLayoutBase)
Gets the row size using the provided row layout.
Declaration
protected virtual Size GetRowSize(GridViewRowInfo row, TableViewRowLayoutBase rowLayout)
Parameters
Grid The row to measure. |
Table The row layout to be used for the measure. |
Returns
System. The size of the row. |
OnAsyncExportCompleted(AsyncCompletedEventArgs)
Raises the Async
Declaration
protected virtual void OnAsyncExportCompleted(AsyncCompletedEventArgs e)
Parameters
System. The System. |
OnAsyncExportProgressChanged(ProgressChangedEventArgs)
Raises the Async
Declaration
protected virtual void OnAsyncExportProgressChanged(ProgressChangedEventArgs e)
Parameters
System. The System. |
OnCellFormatting(PdfExportCellFormattingEventArgs)
Raises the Cell
Declaration
protected virtual void OnCellFormatting(PdfExportCellFormattingEventArgs e)
Parameters
Pdf The Pdf |
OnCellPaint(ExportCellPaintEventArgs)
Raises the Cell
Declaration
protected virtual void OnCellPaint(ExportCellPaintEventArgs e)
Parameters
Export The Export |
OnChildViewExporting(ChildViewExportingEventArgs)
Raises the Child
Declaration
protected virtual void OnChildViewExporting(ChildViewExportingEventArgs e)
Parameters
Child The Child |
OnFooterExported(ExportEventArgs)
OnHeaderExported(ExportEventArgs)
Raises the Header
Declaration
protected virtual void OnHeaderExported(ExportEventArgs e)
Parameters
Export The Export |
OnPdfExported(EventArgs)
Raises the PDFExported event.
Declaration
protected virtual void OnPdfExported(EventArgs e)
Parameters
System. The System. |
ParseHeaderFooterString(String)
RunExport(Stream, IPdfExportRenderer)
Starts an export operation.
Declaration
public void RunExport(Stream exportStream, IPdfExportRenderer exportRenderer)
Parameters
System. The Stream where the RadGridView will be exported. |
IPdf Instance of IPdfExportRenderer class. |
RunExport(String, IPdfExportRenderer)
Starts an export operation.
Declaration
public void RunExport(string fileName, IPdfExportRenderer pdfExportRenderer)
Parameters
System. The file name where data will be exported. |
IPdf . |
RunExportAsync(Stream, IPdfExportRenderer)
Starts an export operation that runs in a background thread.
Declaration
public void RunExportAsync(Stream exportStream, IPdfExportRenderer exportRenderer)
Parameters
System. The stream where data will be exported. |
IPdf Instance of IPdfExportRenderer class. |
RunExportAsync(String, IPdfExportRenderer)
Starts an export operation that runs in a background thread.
Declaration
public void RunExportAsync(string fileName, IPdfExportRenderer exportRenderer)
Parameters
System. The file name where data will be exported. |
IPdf Instance of IPdfExportRenderer class. |
Events
AsyncExportCompleted
Occurs when an async export operation is completed.
Declaration
public event AsyncCompletedEventHandler AsyncExportCompleted
Event Type
System.
|
AsyncExportProgressChanged
Occurs when the progress of an async export operation changes.
Declaration
public event ProgressChangedEventHandler AsyncExportProgressChanged
Event Type
System.
|
CellFormatting
Occurs for every cell that is being exported.
Declaration
public event PdfExportCellFormattingEventHandler CellFormatting
Event Type
CellPaint
Occurs when a cell is drawn.
Declaration
public event ExportCellPaintEventHandler CellPaint
Event Type
ChildViewExporting
Occurs when a child view will be exported.
Declaration
public event ChildViewExportingEventHandler ChildViewExporting
Event Type
FooterExported
HeaderExported
Occurs when the header is exported.
Declaration
public event ExportEventHandler HeaderExported
Event Type
PdfExported
Occurs when the export process completes.
Declaration
public event EventHandler PdfExported
Event Type
System.
|