SheetEditor Class

Represents a content editable element in a spreadsheet.

Inheritance

Object

ComponentBase

Spreadsheet.SheetEditor

Implements

IComponent

IHandleEvent

IHandleAfterRender

Inherited Members

ComponentBase.OnInitialized

ComponentBase.OnInitializedAsync

ComponentBase.OnParametersSet

ComponentBase.StateHasChanged

ComponentBase.ShouldRender

ComponentBase.OnAfterRender

ComponentBase.InvokeAsync

ComponentBase.DispatchExceptionAsync

ComponentBase.SetParametersAsync

ComponentBase.RendererInfo

ComponentBase.Assets

ComponentBase.AssignedRenderMode

Namespace: Radzen.Blazor.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class SheetEditor : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Constructors

SheetEditorLink to this section

Represents a content editable element in a spreadsheet.

Declaration
public SheetEditor()

Properties

AttributesLink to this section

Gets or sets additional HTML attributes for the content editable element.

Declaration
public IReadOnlyDictionary<string, object> Attributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Gets or sets additional HTML attributes for the content editable element.

AutoFocusLink to this section

Gets or sets a value indicating whether the content editable element should automatically receive focus when rendered.

Declaration
public bool AutoFocus { get; set; }
Property Value
Type Description
boolGets or sets a value indicating whether the content editable element should automatically receive focus when rendered.

BlurLink to this section

Event callback that is invoked when the content editable element loses focus.

Declaration
public EventCallback Blur { get; set; }
Property Value
Type Description
EventCallbackEvent callback that is invoked when the content editable element loses focus.

FocusLink to this section

Event callback that is invoked when the content editable element gains focus.

Declaration
public EventCallback Focus { get; set; }
Property Value
Type Description
EventCallbackEvent callback that is invoked when the content editable element gains focus.

InputAttributesLink to this section

Gets or sets HTML attributes applied to the inner contenteditable (the focusable text field): e.g. aria-label, aria-invalid, tabindex. Unlike Attributes (which lands on the outer wrapper), these reach the element the screen reader names and focuses.

Declaration
public IReadOnlyDictionary<string, object> InputAttributes { get; set; }
Property Value
Type Description
IReadOnlyDictionary<string, object>Gets or sets HTML attributes applied to the inner contenteditable (the focusable text field): e.g. aria-label, aria-invalid, tabindex. Unlike Attributes (which lands on the outer wrapper), these reach the element the screen reader names and focuses.

ReadOnlyLink to this section

When true, the input is rendered as non-editable. Used by the formula bar when the host spreadsheet is read-only or has editing disabled.

Declaration
public bool ReadOnly { get; set; }
Property Value
Type Description
boolWhen true, the input is rendered as non-editable. Used by the formula bar when the host spreadsheet is read-only or has editing disabled.

ValueLink to this section

Gets or sets the value of the content editable element.

Declaration
public string Value { get; set; }
Property Value
Type Description
stringGets or sets the value of the content editable element.

ValueChangedLink to this section

Event callback that is invoked when the value of the content editable element changes.

Declaration
public EventCallback<string> ValueChanged { get; set; }
Property Value
Type Description
EventCallback<string>Event callback that is invoked when the value of the content editable element changes.

WorksheetLink to this section

Gets or sets the sheet associated with the content editable element.

Declaration
public Documents.Spreadsheet.Worksheet Worksheet { get; set; }
Property Value
Type Description
Documents.Spreadsheet.WorksheetGets or sets the sheet associated with the content editable element.

Methods

BuildRenderTreeLink to this section

Declaration
protected override void BuildRenderTree(Rendering.RenderTreeBuilder __builder)
Parameters
Type Name Description
Rendering.RenderTreeBuilder __builder

OnAfterRenderAsyncLink to this section

Declaration
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters
Type Name Description
bool firstRender
Returns
Type Description
Task

OnBlurAsyncLink to this section

Invoked by JS interop when the content editable element loses focus.

Declaration
public Task OnBlurAsync()
Returns
Type Description
Task

OnFocusAsyncLink to this section

Invoked by JS interop when the content editable element gains focus.

Declaration
public Task OnFocusAsync()
Returns
Type Description
Task

OnInputAsyncLink to this section

Invoked by JS interop when the content editable element's value changes.

Declaration
public Task OnInputAsync(string value)
Parameters
Type Name Description
string value
Returns
Type Description
Task

OnKeyDownAsyncLink to this section

Invoked by JS interop when a key is pressed down in the content editable element.

Declaration
public Task OnKeyDownAsync(KeyboardEventArgs args)
Parameters
Type Name Description
KeyboardEventArgs args
Returns
Type Description
Task

OnParametersSetAsyncLink to this section

Declaration
protected override Task OnParametersSetAsync()
Returns
Type Description
Task

OnSelectionChangeAsyncLink to this section

Invoked by JS interop when the selection in the content editable element changes.

Declaration
public Task OnSelectionChangeAsync(int caretPosition)
Parameters
Type Name Description
int caretPosition
Returns
Type Description
Task

SetValueAsyncLink to this section

Sets the value of the content editable element asynchronously.

Declaration
public Task SetValueAsync(string value, int? moveCaretTo)
Parameters
Type Name Description
string value
int? moveCaretTo
Returns
Type Description
Task
An error has occurred. This app may no longer respond until reloaded. Reload 🗙