ASP.NET Core MVC Controls | ComponentOne
In This Topic
    PdfFormatItemEventArgs Class
    In This Topic
    File
    wijmo.grid.pdf.js
    Module
    wijmo.grid.pdf

    Represents arguments of the IFlexGridDrawSettings.formatItem callback.

    Constructor

    Properties

    Methods

    Constructor

    constructor

    constructor(p: any /*_IGridPanel*/, rng: any /*_ICellRange*/, cell: HTMLElement, canvas: PdfPageArea, clientRect: Rect, contentRect: Rect, style: ICellStyle, getFormattedCell?: (), getTextRect?: ()): PdfFormatItemEventArgs
    

    Initializes a new instance of the PdfFormatItemEventArgs class.

    Parameters
    • p: any /*_IGridPanel*/

      GridPanel that contains the range.

    • rng: any /*_ICellRange*/

      Range of cells affected by the event.

    • cell: HTMLElement

      Element that represents the grid cell to be rendered.

    • canvas: wijmo.pdf.PdfPageArea

      Canvas to perform the custom painting on.

    • clientRect: Rect

      Object that represents the client rectangle of the grid cell to be rendered in canvas coordinates.

    • contentRect: Rect

      Object that represents the content rectangle of the grid cell to be rendered in canvas coordinates.

    • style: ICellStyle

      Object that represents the style of the grid cell to be rendered.

    • getFormattedCell: ()
    Optional

    Callback function that should return the grid cell when the getFormattedCell method is called.

    Callback function that should return the text rectangle of the grid cell to be rendered in canvas coordinates.

    Returns
    PdfFormatItemEventArgs

    Properties

    cancelBorders

    Gets or sets a value that indicates that default cell borders drawing should be canceled.

    Type
    boolean

    canvas

    Gets the canvas to perform the custom painting on.

    Type
    wijmo.pdf.PdfPageArea

    cell

    Gets a reference to the element that represents the grid cell being rendered. If IFlexGridDrawSettings.customCellContent is set to true then contains reference to the element that represents the formatted grid cell; otherwise, a null value.

    Type
    HTMLElement

    clientRect

    Gets the client rectangle of the cell being rendered in canvas coordinates.

    Type
    Rect

    col

    Gets the column affected by this event.

    Type
    number

    contentRect

    Gets the content rectangle of the cell being rendered in canvas coordinates.

    Type
    Rect

    data

    Gets or sets the data associated with the event.

    Type
    any

    panel

    Gets the GridPanel affected by this event.

    Type
    GridPanel

    range

    Gets the CellRange affected by this event.

    Type
    CellRange

    row

    Gets the row affected by this event.

    Type
    number

    style

    Gets an object that represents the style of the cell being rendered. If IFlexGridDrawSettings.customCellContent is set to true then the style is inferred from the cell style; othwerwise it contains a combination of the IFlexGridDrawSettings.styles export setting, according to the row type of exported cell.

    Type
    ICellStyle

    tagContent

    Gets or sets a reference to a marked structure content of the cell.

    If user produces Tagged PDF and draws the cell content manually, then he can mark the cell content and return a reference to the structure content via this property. The returned item will be incorporated into the document's structure tree.

    For example:

    args.tagContent = args.canvas.beginTagContent(wijmo.pdf.PdfTagType.P);
    args.canvas.drawText('Some text', x, y);
    args.canvas.endTagContent();
    
    Type
    IPdfTagContent

    textTop

    Gets the value that represents the top position of the text of the cell being rendered in canvas coordinates.

    Type
    number

    Methods

    drawBackground

    drawBackground(brush?: Color | string): void
    

    Draws the background of the cell with the specified brush or color, or, if it is not specified, with the value of the backgroundColor property.

    Parameters
    • brush: wijmo.pdf.PdfBrush | wijmo.Color | string
    Optional

    The brush or color to use.

    Returns
    void

    getFormattedCell

    getFormattedCell(): HTMLElement
    

    Returns a reference to the element that represents the grid cell being rendered. This method is useful when export of custom formatting is disabled, but you need to export custom content for certain cells.

    Returns
    HTMLElement