menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class EditorComponent - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class EditorComponent

    Represents a component that is rendered during the editing state of the Syncfusion.Blazor.InPlaceEditor.

    Inheritance
    System.Object
    EditorComponent
    Namespace: Syncfusion.Blazor.InPlaceEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class EditorComponent : OwningComponentBase
    Remarks

    The EditorComponent is a child component of the Syncfusion.Blazor.InPlaceEditor and is responsible for hosting the content that becomes editable. It should contain the input components (e.g., SfTextBox, SfDatePicker) that the user interacts with to modify the value.

    Examples

    The following example demonstrates how to define a SfDatePicker within the EditorComponent.

    <SfInPlaceEditor>
        <EditorComponent>
            <SfDatePicker TValue="DateTime?" @bind-Value="@DateValue"></SfDatePicker>
        </EditorComponent>
    </SfInPlaceEditor>

    Constructors

    EditorComponent()

    Declaration
    public EditorComponent()

    Properties

    ChildContent

    Gets or sets the content to be displayed inside the Syncfusion.Blazor.InPlaceEditor when it is in an editable state.

    Declaration
    public RenderFragment ChildContent { get; set; }
    Property Value
    Type Description
    Microsoft.AspNetCore.Components.RenderFragment

    A Microsoft.AspNetCore.Components.RenderFragment that defines the editable user interface. The default value is null.

    Remarks

    This property is used to host input components like SfTextBox, SfDropDownList, or any other Blazor component that allows user input. The content of this template is displayed when the editor is in edit mode.

    Examples

    The following example demonstrates how to define a SfDatePicker within the EditorComponent.

    <SfInPlaceEditor>
        <EditorComponent>
            <SfDatePicker TValue="DateTime?" @bind-Value="@DateValue"></SfDatePicker>
        </EditorComponent>
    </SfInPlaceEditor>

    Methods

    Dispose()

    Releases all resources used by the EditorComponent.

    Declaration
    public virtual void Dispose()
    Remarks

    This method is the public entry point for disposing of the component and its resources.

    Dispose(Boolean)

    Releases the unmanaged resources used by the EditorComponent and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    A bool that indicates whether the method call comes from a Dispose() method (its value is true) or from a finalizer (its value is false).

    Remarks

    When disposing is true, this method cleans up references to the parent component and child content to prevent memory leaks.

    OnInitializedAsync()

    Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task

    A System.Threading.Tasks.Task that represents the asynchronous initialization process.

    Remarks

    This method registers the EditorComponent with its parent Syncfusion.Blazor.InPlaceEditor, enabling communication between them.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved