UndoRedoStack Class

Represents a stack for managing undo and redo operations in a spreadsheet.

Inheritance

Object

Spreadsheet.UndoRedoStack

Namespace: Radzen.Blazor.Spreadsheet

Assembly: Radzen.Blazor.dll

Syntax

public class UndoRedoStack

Constructors

UndoRedoStacklink

Initializes a new instance of the UndoRedoStack class bound to the worksheet whose commands it batches.

Declaration
public UndoRedoStack(Documents.Spreadsheet.Worksheet worksheet)
Parameters
Type Name Description
Documents.Spreadsheet.Worksheet worksheet

Properties

CanRedolink

Gets a value indicating whether the redo stack is empty.

Declaration
public bool CanRedo { get; }
Property Value
Type Description
boolGets a value indicating whether the redo stack is empty.

CanUndolink

Gets a value indicating whether the undo stack is empty.

Declaration
public bool CanUndo { get; }
Property Value
Type Description
boolGets a value indicating whether the undo stack is empty.

Methods

Executelink

Executes a command and adds it to the undo stack if successful.

Declaration
public bool Execute(Spreadsheet.ICommand command)
Parameters
Type Name Description
Spreadsheet.ICommand command
Returns
Type Description
bool

Redolink

Redoes the last undone command, moving it back to the undo stack.

Declaration
public void Redo()

Undolink

Undoes the last executed command, moving it to the redo stack.

Declaration
public void Undo()

Events

Changedlink

Event raised when the undo or redo stacks change.

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