alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class InPlaceEditorEvents<TValue>

    Configures the event handlers for the SfInPlaceEditor<TValue>.

    Inheritance
    object
    ComponentBase
    OwningComponentBase
    SfOwningComponentBase
    InPlaceEditorEvents<TValue>
    Implements
    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    Inherited Members
    ComponentBase.Assets
    ComponentBase.AssignedRenderMode
    ComponentBase.BuildRenderTree(RenderTreeBuilder)
    ComponentBase.DispatchExceptionAsync(Exception)
    ComponentBase.InvokeAsync(Action)
    ComponentBase.InvokeAsync(Func<Task>)
    ComponentBase.OnAfterRender(bool)
    ComponentBase.OnAfterRenderAsync(bool)
    ComponentBase.OnInitialized()
    ComponentBase.OnParametersSet()
    ComponentBase.OnParametersSetAsync()
    ComponentBase.RendererInfo
    ComponentBase.SetParametersAsync(ParameterView)
    ComponentBase.ShouldRender()
    ComponentBase.StateHasChanged()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    OwningComponentBase.IsDisposed
    OwningComponentBase.ScopedServices
    Namespace: Syncfusion.Blazor.InPlaceEditor
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class InPlaceEditorEvents<TValue> : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
    Type Parameters
    Name Description
    TValue

    Specifies the data type of the value being edited.

    Remarks

    This component allows you to define and manage callbacks for various events triggered by the SfInPlaceEditor<TValue>, such as value changes, lifecycle events, and interaction events.

    Examples

    The following example demonstrates how to handle the ValueChange event to log the new value.

    <SfInPlaceEditor @bind-Value="@EditorValue">
        <InPlaceEditorEvents TValue="string" ValueChange="@OnValueChange"></InPlaceEditorEvents>
    </SfInPlaceEditor>
    
    @code {
        private string EditorValue = "Initial Value";
    
        private void OnValueChange(ChangeEventArgs<string> args)
        {
            Console.WriteLine($"The new value is: {args.Value}");
        }
    }

    Constructors

    InPlaceEditorEvents()

    Declaration
    public InPlaceEditorEvents()

    Properties

    BeginEdit

    Gets or sets an event callback that triggers before the editor switches from its default state to edit mode.

    Declaration
    [Parameter]
    public EventCallback<BeginEditEventArgs> BeginEdit { get; set; }
    Property Value
    Type Description
    EventCallback<BeginEditEventArgs>

    An EventCallback<TValue> that is invoked before entering edit mode. The callback receives BeginEditEventArgs.

    Remarks

    This event allows you to execute code just before the editing UI is displayed. You can cancel the edit operation by setting e.Cancel = true in the event handler.

    Created

    Gets or sets an event callback that triggers once the component has completed its rendering.

    Declaration
    [Parameter]
    public EventCallback<object> Created { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An EventCallback that is invoked after the component has been rendered. The default value is null.

    Remarks

    This event is fired after the initial rendering of the component is complete, allowing you to perform actions that require the DOM to be fully loaded.

    Destroyed

    Gets or sets an event callback that triggers when the component is destroyed.

    Declaration
    [Parameter]
    public EventCallback<object> Destroyed { get; set; }
    Property Value
    Type Description
    EventCallback<object>

    An EventCallback that is invoked when the component is being removed from the DOM. The default value is null.

    Remarks

    This event is useful for performing cleanup operations, such as disposing of resources that are not managed by the Blazor framework, just before the component is destroyed.

    EndEdit

    Gets or sets an event callback that triggers when the edit action is finished, before the new value is submitted or canceled.

    Declaration
    [Parameter]
    public EventCallback<EndEditEventArgs> EndEdit { get; set; }
    Property Value
    Type Description
    EventCallback<EndEditEventArgs>

    An EventCallback<TValue> that is invoked when editing is complete. The callback receives EndEditEventArgs.

    Remarks

    This event provides an opportunity to inspect the edited value before it is saved or discarded.

    OnActionBegin

    Gets or sets an event callback that triggers before data is submitted to the server.

    Declaration
    [Parameter]
    public EventCallback<ActionBeginEventArgs<TValue>> OnActionBegin { get; set; }
    Property Value
    Type Description
    EventCallback<ActionBeginEventArgs<TValue>>

    An EventCallback<TValue> that is invoked before the submission process begins. The callback receives ActionBeginEventArgs<TValue>, which can be used to cancel the action.

    Remarks

    This event allows you to perform validation or other pre-submission logic. Set e.Cancel = true within the event handler to prevent the data from being saved.

    OnActionFailure

    Gets or sets an event callback that triggers when data submission fails.

    Declaration
    [Parameter]
    public EventCallback<ActionEventArgs<TValue>> OnActionFailure { get; set; }
    Property Value
    Type Description
    EventCallback<ActionEventArgs<TValue>>

    An EventCallback<TValue> that is invoked upon a failed submission. The callback receives ActionEventArgs<TValue>.

    Remarks

    This event is useful for implementing custom error handling logic, such as displaying a notification to the user when the save operation does not succeed.

    OnActionSuccess

    Gets or sets an event callback that triggers when data is successfully submitted to the server.

    Declaration
    [Parameter]
    public EventCallback<ActionEventArgs<TValue>> OnActionSuccess { get; set; }
    Property Value
    Type Description
    EventCallback<ActionEventArgs<TValue>>

    An EventCallback<TValue> that is invoked upon a successful submission. The callback receives ActionEventArgs<TValue>.

    Remarks

    Use this event to perform actions after a successful save, such as refreshing related data or displaying a confirmation message.

    ValueChange

    Gets or sets an event callback that triggers when the value of the integrated component has changed.

    Declaration
    [Parameter]
    public EventCallback<ChangeEventArgs<TValue>> ValueChange { get; set; }
    Property Value
    Type Description
    EventCallback<ChangeEventArgs<TValue>>

    An EventCallback<TValue> that is invoked when the value changes. The callback receives ChangeEventArgs<TValue>.

    Remarks

    This event is essential for tracking changes to the editor's value in real-time and updating the underlying data model accordingly. It corresponds to the @bind-Value functionality.

    Methods

    Dispose()

    Releases all resources used by the InPlaceEditorEvents<TValue>.

    Declaration
    public virtual void Dispose()
    Remarks

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

    Dispose(bool)

    Releases the unmanaged resources used by the InPlaceEditorEvents<TValue> and optionally releases the managed resources.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    bool 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).

    Overrides
    OwningComponentBase.Dispose(bool)
    Remarks

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

    OnInitializedAsync()

    Method invoked when the component is ready to start.

    Declaration
    protected override Task OnInitializedAsync()
    Returns
    Type Description
    Task

    A Task that represents the asynchronous initialization process.

    Overrides
    ComponentBase.OnInitializedAsync()
    Remarks

    This method registers the event delegates with the parent SfInPlaceEditor<TValue>, enabling event handling.

    Implements

    IComponent
    IHandleEvent
    IHandleAfterRender
    IDisposable
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved