alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class FormFieldDeletedEventArgs

    Provides event data for the form field deletion event in the SfPdfViewer2 component.

    Inheritance
    object
    FormFieldDeletedEventArgs
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.SfPdfViewer
    Assembly: Syncfusion.Blazor.SfPdfViewer.dll
    Syntax
    public class FormFieldDeletedEventArgs
    Remarks

    The FormFieldDeletedEventArgs class contains information about the form field that was removed, allowing developers to access its properties and execute necessary logic when a form field is deleted from the PDF.

    Examples
    <SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
        <PdfViewerEvents FormFieldDeleted="@OnFormFieldDeleted"></PdfViewerEvents>
    </SfPdfViewer2>
    
    @code {
    void OnFormFieldDeleted(FormFieldDeletedEventArgs args)
    {
        // Access details of the deleted form field
        Console.WriteLine($"Form field deleted: {args.Field.Name}");
    
        // Implement additional logic, such as logging or UI updates
    }
    }

    Constructors

    FormFieldDeletedEventArgs()

    Declaration
    public FormFieldDeletedEventArgs()

    Properties

    Field

    Gets the form field object that was deleted in the SfPdfViewer2 component.

    Declaration
    [JsonPropertyName("field")]
    [JsonInclude]
    public FormFieldInfo Field { get; }
    Property Value
    Type Description
    FormFieldInfo

    An instance of FormFieldInfo representing the deleted form field.

    Remarks

    This property provides access to the form field that was removed, allowing you to retrieve its details and perform necessary actions upon deletion, such as logging, UI updates, or data persistence.

    Examples
    <SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
        <PdfViewerEvents FormFieldDeleted="@OnFormFieldDeleted"></PdfViewerEvents>
    </SfPdfViewer2>
    
    @code {
    void OnFormFieldDeleted(FormFieldDeletedEventArgs args)
    {
        // Retrieve the deleted form field
        FormFieldInfo deletedField = args.Field;
        Console.WriteLine($"Form field deleted: {deletedField.Name}");
    
        // Implement additional logic
    }
    }

    PageNumber

    Gets the page number where the form field was deleted in the SfPdfViewer2 component.

    Declaration
    [JsonPropertyName("pageNumber")]
    [JsonInclude]
    public int PageNumber { get; }
    Property Value
    Type Description
    int

    An int representing the page number where the form field was deleted.

    Remarks

    This property provides the page number associated with the deleted form field, helping to identify its location within the document.

    Examples
    <SfPdfViewer2 @ref="Viewer" Height="100%" Width="100%">
        <PdfViewerEvents FormFieldDeleted="@OnFormFieldDeleted"></PdfViewerEvents>
    </SfPdfViewer2>
    
    @code {
    void OnFormFieldDelete(FormFieldDeleteEventArgs args)
    {
        // Retrieve the page number of the deleted form field
        int pageNumber = args.PageNumber;
        Console.WriteLine($"Form field deleted on page: {pageNumber}");
    
        // Implement additional logic
    }
    }
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved