menu

ASP.NET MVC - EJ2

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class TreeGridPdfExport - ASP.NETMVC-EJ2 API Reference | Syncfusion

    Show / Hide Table of Contents

    Class TreeGridPdfExport

    Represents a class for exporting Tree Grid data to PDF format.

    Inheritance
    System.Object
    TreeGridExportBase
    TreeGridPdfExport
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    TreeGridExportBase.DataSource
    TreeGridExportBase.EmptyText
    TreeGridExportBase.FileName
    TreeGridExportBase.FilePath
    TreeGridExportBase.FontWeight
    TreeGridExportBase.FormatOptions
    TreeGridExportBase.HeaderText
    TreeGridExportBase.IncludeHiddenColumns
    Namespace: Syncfusion.EJ2.TreeGridExport
    Assembly: Syncfusion.EJ2.GridExport.dll
    Syntax
    public class TreeGridPdfExport : TreeGridExportBase
    Remarks

    This class offers methods to export Tree Grid data to PDF format. It enables the conversion of Tree Grid data and related settings into PDF-compatible format for easy sharing and printing.

    Constructors

    TreeGridPdfExport()

    Declaration
    public TreeGridPdfExport()

    Properties

    BeginCellLayout

    Gets or sets the event handler for handling the grid's BeginCellLayout event during PDF export.

    Declaration
    public PdfGridBeginCellLayoutEventHandler BeginCellLayout { get; set; }
    Property Value
    Type Description
    Syncfusion.Pdf.Grid.PdfGridBeginCellLayoutEventHandler

    The event handler for the BeginCellLayout event.

    Remarks

    This event handler is used to customize the layout of cells during PDF export.

    EnableAutoFit

    Gets or sets a value indicating whether auto-fit should be enabled during PDF export. It autofits the column’s width in the exported document.

    Declaration
    public bool EnableAutoFit { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if auto-fit should be enabled; otherwise, false. The default value is false.

    Remarks

    Set this property to control whether auto-fit should be applied during PDF export. Auto-fit can be useful when you want to ensure that the exported PDF content fits well within the page layout.

    EnableUnicodeEncoding

    Gets or sets whether Unicode encoding should be used for the exported content.

    Declaration
    public bool EnableUnicodeEncoding { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if Unicode encoding should be used; otherwise, false. The default value is false..

    Remarks

    This property is used to control whether Unicode encoding should be applied for the exported content. Use Unicode encoding when your content includes characters from various languages or special symbols.

    ExportType

    Gets or sets a value indicating whether all pages or the current page should be exported.

    Declaration
    public ExportType ExportType { get; set; }
    Property Value
    Type Description
    ExportType

    One of the ExportType enumeration that specifies which portion of the content is exported. The default mode is AllPages.

    Remarks

    Use this property to control which portion of the content should be exported.

    PdfDocument

    Gets or sets an instance of Syncfusion.Pdf.PdfDocument for the exporting document.

    Declaration
    public PdfDocument PdfDocument { get; set; }
    Property Value
    Type Description
    Syncfusion.Pdf.PdfDocument

    An instance of Syncfusion.Pdf.PdfDocument

    PdfVersion

    Gets or sets a value that indicates the PDF version of the document to be exported.

    Declaration
    public PdfVersion PdfVersion { get; set; }
    Property Value
    Type Description
    Syncfusion.Pdf.PdfVersion

    One of the Syncfusion.Pdf.PdfVersion enumerations that specifies the version of the exported document. The default value is Syncfusion.Pdf.PdfVersion.Version1_5.

    Remarks

    Use this property to set the desired Excel version for the exported document. The supported versions are defined in the Syncfusion.Pdf.PdfVersion enumeration.

    TargetPage

    Gets or sets the target PdfPage for PDF export.

    Declaration
    public PdfPage TargetPage { get; set; }
    Property Value
    Type Description
    Syncfusion.Pdf.PdfPage

    The target PdfPage for export.

    Remarks

    Use this property to specify the target PdfPage for the exported content in PDF export.

    Theme

    Gets or sets the theme to apply to the exported content.

    Declaration
    public string Theme { get; set; }
    Property Value
    Type Description
    System.String

    The theme to apply.

    Remarks

    Use this property to specify the desired theme to apply to the exported content.

    Methods

    ExportCaptionRow(String, PdfGridRow)

    Exports the record row.

    Declaration
    protected void ExportCaptionRow(string value, PdfGridRow row)
    Parameters
    Type Name Description
    System.String value

    The value.

    Syncfusion.Pdf.Grid.PdfGridRow row

    ExportRecordRow(String, PdfGridRow)

    Exports the record row.

    Declaration
    protected void ExportRecordRow(string value, PdfGridRow row)
    Parameters
    Type Name Description
    System.String value

    The value.

    Syncfusion.Pdf.Grid.PdfGridRow row

    ExportToPdf<T>(TreeGrid, IEnumerable, PdfExportProperties)

    Exports the contents of a tree grid to a PDF file.

    Declaration
    public ActionResult ExportToPdf<T>(TreeGrid TreeGridModel, IEnumerable result, PdfExportProperties CustomPdfProperties = null)
    Parameters
    Type Name Description
    TreeGrid TreeGridModel

    The TreeGrid instance to be exported.

    System.Collections.IEnumerable result

    The data items/datasource to be exported.

    PdfExportProperties CustomPdfProperties

    Custom properties for the PDF export.

    Returns
    Type
    System.Web.Mvc.ActionResult
    Type Parameters
    Name Description
    T

    The type of data items in the tree grid.

    SaveLocal(String)

    Saves the generated PDF document to a local file.

    Declaration
    public void SaveLocal(string filepath)
    Parameters
    Type Name Description
    System.String filepath

    The full path of the local file where the PDF will be saved.

    SetFontStyles(PdfGridCell)

    Declaration
    protected void SetFontStyles(PdfGridCell cell)
    Parameters
    Type Name Description
    Syncfusion.Pdf.Grid.PdfGridCell cell
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved