Represents an editor for a spreadsheet, allowing users to edit cell values or formulas.
Object
Namespace: Radzen.Blazor.Spreadsheet
Assembly: Radzen.Blazor.dll
public class EditorRepresents an editor for a spreadsheet, allowing users to edit cell values or formulas.
public Editor(Documents.Spreadsheet.Worksheet sheet)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.Worksheet | sheet |
Gets or sets the address of the cell being edited in the spreadsheet.
public Documents.Spreadsheet.CellRef Address { get; set; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.CellRef | Gets or sets the address of the cell being edited in the spreadsheet. |
Gets the cell at the current address in the spreadsheet, or null if the address is invalid.
public Documents.Spreadsheet.Cell Cell { get; }
| Type | Description |
|---|---|
| Documents.Spreadsheet.Cell | Gets the cell at the current address in the spreadsheet, or null if the address is invalid. |
Checks if there are changes in the editor that need to be accepted or canceled.
public bool HasChanges { get; }
| Type | Description |
|---|---|
| bool | Checks if there are changes in the editor that need to be accepted or canceled. |
Gets or sets the mode of the editor, indicating whether it is in cell edit mode or formula edit mode.
public Spreadsheet.EditMode Mode { get; }
| Type | Description |
|---|---|
| Spreadsheet.EditMode | Gets or sets the mode of the editor, indicating whether it is in cell edit mode or formula edit mode. |
Gets or sets the value being edited in the spreadsheet editor.
public string Value { get; set; }
| Type | Description |
|---|---|
| string | Gets or sets the value being edited in the spreadsheet editor. |
Accepts the current value in the editor, applying it to the cell if valid.
public bool Accept()
| Type | Description |
|---|---|
| bool |
Cancels the current edit operation, resetting the editor's value and mode without applying changes.
public void Cancel()Ends the current edit operation, resetting the editor's mode and address without applying changes.
public void EndEdit()Starts editing a cell in the spreadsheet with the specified address and value.
public void StartEdit(Documents.Spreadsheet.CellRef address, string value, Spreadsheet.EditMode mode)
| Type | Name | Description |
|---|---|---|
| Documents.Spreadsheet.CellRef | address | |
| string | value | |
| Spreadsheet.EditMode | mode |