Editor Class

Represents an editor for a spreadsheet, allowing users to edit cell values or formulas.

Inheritance

Object

Spreadsheet.Editor

Namespace: Radzen.Blazor.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class Editor

Constructors

Editorlink

Represents an editor for a spreadsheet, allowing users to edit cell values or formulas.

Declaration
public Editor(Documents.Spreadsheet.Worksheet sheet)
Parameters
Type Name Description
Documents.Spreadsheet.Worksheet sheet

Properties

Addresslink

Gets or sets the address of the cell being edited in the spreadsheet.

Declaration
public Documents.Spreadsheet.CellRef Address { get; set; }
Property Value
Type Description
Documents.Spreadsheet.CellRefGets or sets the address of the cell being edited in the spreadsheet.

Celllink

Gets the cell at the current address in the spreadsheet, or null if the address is invalid.

Declaration
public Documents.Spreadsheet.Cell Cell { get; }
Property Value
Type Description
Documents.Spreadsheet.CellGets the cell at the current address in the spreadsheet, or null if the address is invalid.

HasChangeslink

Checks if there are changes in the editor that need to be accepted or canceled.

Declaration
public bool HasChanges { get; }
Property Value
Type Description
boolChecks if there are changes in the editor that need to be accepted or canceled.

Modelink

Gets or sets the mode of the editor, indicating whether it is in cell edit mode or formula edit mode.

Declaration
public Spreadsheet.EditMode Mode { get; }
Property Value
Type Description
Spreadsheet.EditModeGets or sets the mode of the editor, indicating whether it is in cell edit mode or formula edit mode.

Valuelink

Gets or sets the value being edited in the spreadsheet editor.

Declaration
public string Value { get; set; }
Property Value
Type Description
stringGets or sets the value being edited in the spreadsheet editor.

Methods

Acceptlink

Accepts the current value in the editor, applying it to the cell if valid.

Declaration
public bool Accept()
Returns
Type Description
bool

Cancellink

Cancels the current edit operation, resetting the editor's value and mode without applying changes.

Declaration
public void Cancel()

EndEditlink

Ends the current edit operation, resetting the editor's mode and address without applying changes.

Declaration
public void EndEdit()

StartEditlink

Starts editing a cell in the spreadsheet with the specified address and value.

Declaration
public void StartEdit(Documents.Spreadsheet.CellRef address, string value, Spreadsheet.EditMode mode)
Parameters
Type Name Description
Documents.Spreadsheet.CellRef address
string value
Spreadsheet.EditMode mode

Events

Changedlink

Occurs when the editor's state changes, such as when it starts or ends editing a cell.

Declaration
public event Action Changed

ValueChangedlink

Occurs when the value being edited in the spreadsheet editor changes.

Declaration
public event Action ValueChanged
An error has occurred. This app may no longer respond until reloaded. Reload 🗙