Table of Contents

Class _BOBDataGridCellEditor<TItem>

Namespace
BlazOrbit.Components
Assembly
BlazOrbit.dll
public class _BOBDataGridCellEditor<TItem> : ComponentBase

Type Parameters

TItem
Inheritance
object
ComponentBase
_BOBDataGridCellEditor<TItem>

Constructors

_BOBDataGridCellEditor()

public _BOBDataGridCellEditor()

Properties

Column

Column registration. ValueSelector seeds the input; ValueSetter writes back.

[Parameter]
[EditorRequired]
public DataColumnRegistration<TItem> Column { get; set; }

Property Value

DataColumnRegistration<TItem>

Item

Row item whose property the editor mutates via the column's ValueSetter.

[Parameter]
[EditorRequired]
public TItem Item { get; set; }

Property Value

TItem

OnCancel

Raised when the user discards the change (Escape).

[Parameter]
public EventCallback<TItem> OnCancel { get; set; }

Property Value

EventCallback<TItem>

OnCommit

Raised when the user saves the change (blur, Enter, checkbox toggle).

[Parameter]
public EventCallback<TItem> OnCommit { get; set; }

Property Value

EventCallback<TItem>

OnValidate

Raised when the column's Validator rejects the proposed value. Carries the error message so the grid can surface it in the cell tooltip + apply the invalid-cell styling. When non-null, the editor stays open so the user can fix the input.

[Parameter]
public EventCallback<(TItem Item, string? Error)> OnValidate { get; set; }

Property Value

EventCallback<(TItem Item, string Error)>

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

OnAfterRenderAsync(bool)

Method invoked after each time the component has been rendered interactively and the UI has finished updating (for example, after elements have been added to the browser DOM). Any Microsoft.AspNetCore.Components.ElementReference fields will be populated by the time this runs.

This method is not invoked during prerendering or server-side rendering, because those processes are not attached to any live browser DOM and are already complete before the DOM is updated.

Note that the component does not automatically re-render after the completion of any returned System.Threading.Tasks.Task, because that would cause an infinite render loop.

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Set to true if this is the first time Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) has been invoked on this component instance; otherwise false.

Returns

Task

A System.Threading.Tasks.Task representing any asynchronous operation.

Remarks

The Microsoft.AspNetCore.Components.ComponentBase.OnAfterRender(bool) and Microsoft.AspNetCore.Components.ComponentBase.OnAfterRenderAsync(bool) lifecycle methods are useful for performing interop, or interacting with values received from @ref. Use the firstRender parameter to ensure that initialization work is only performed once.

OnInitialized()

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

protected override void OnInitialized()