skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • Roadmap
    • Release History
  • Docs & Support
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class WorkbookHistory

Manages undo/redo stacks for workbook modifications, tracking command execution and enabling history navigation.

Inheritance
System.Object
WorkbookHistory
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Telerik.Windows.Documents.Spreadsheet.History
Assembly: Telerik.Windows.Documents.Spreadsheet.dll

Syntax

public class WorkbookHistory

Fields

DefaultDepth

The default depth of the workbook history.

Declaration
public const int DefaultDepth = 2147483647
Field Value
System.Int32

Properties

CanRedo

Indicates whether the redo stack contains actions available to reapply.

Declaration
public bool CanRedo { get; }
Property Value
System.Boolean

The value indicating whether redo can be performed.

CanUndo

Indicates whether the undo stack contains actions available to reverse.

Declaration
public bool CanUndo { get; }
Property Value
System.Boolean

The value indicating whether undo can be performed.

Depth

Maximum number of actions retained in the undo stack before oldest entries are discarded.

Declaration
public int Depth { get; set; }
Property Value
System.Int32

The depth of the history.

IsEnabled

Controls whether commands are recorded in the undo/redo stacks; when disabled, history is cleared and recording stops.

Declaration
public bool IsEnabled { get; set; }
Property Value
System.Boolean

The value indicating whether history is enabled.

IsInUndoGroup

Indicates whether multiple commands are being batched into a single undoable action via BeginUndoGroup/EndUndoGroup.

Declaration
public bool IsInUndoGroup { get; }
Property Value
System.Boolean

The value indicating whether the history is currently recording an undo group.

Workbook

Workbook instance whose modification history is tracked by this history manager.

Declaration
public Workbook Workbook { get; }
Property Value
Workbook

The workbook.

Methods

BeginUndoGroup()

Starts batching subsequent commands into a single composite action that will undo/redo together.

Declaration
public void BeginUndoGroup()

CancelUndoGroup()

Aborts the current undo group and reverts all commands executed within it.

Declaration
public void CancelUndoGroup()

Clear()

Removes all actions from both undo and redo stacks, resetting history to empty.

Declaration
public void Clear()

EndUndoGroup()

Completes the current undo group and commits the batched commands as a single history entry.

Declaration
public void EndUndoGroup()

OnCleared()

Invokes the Cleared event after removing all history entries.

Declaration
protected virtual void OnCleared()

OnRecordExecuted(WorkbookHistoryAction, Boolean)

Invokes the RecordExecuted event after committing a history action.

Declaration
protected virtual void OnRecordExecuted(WorkbookHistoryAction historyAction, bool isMerged)
Parameters
WorkbookHistoryAction historyAction

The history action.

System.Boolean isMerged

This parameter is not used and is reserved for future use.

OnRecordExecuting()

Invokes the RecordExecuting event when history recording starts.

Declaration
protected virtual void OnRecordExecuting()

OnRedoExecuted(WorkbookHistoryAction)

Invokes the RedoExecuted event after completing a redo operation.

Declaration
protected virtual void OnRedoExecuted(WorkbookHistoryAction historyAction)
Parameters
WorkbookHistoryAction historyAction

The history action.

OnRedoExecuting(WorkbookHistoryAction)

Invokes the RedoExecuting event before reapplying a history action.

Declaration
protected virtual void OnRedoExecuting(WorkbookHistoryAction historyAction)
Parameters
WorkbookHistoryAction historyAction

The history action.

OnUndoExecuted(WorkbookHistoryAction)

Invokes the UndoExecuted event after completing an undo operation.

Declaration
protected virtual void OnUndoExecuted(WorkbookHistoryAction historyAction)
Parameters
WorkbookHistoryAction historyAction

The history action.

OnUndoExecuting(WorkbookHistoryAction)

Invokes the UndoExecuting event before reversing a history action.

Declaration
protected virtual void OnUndoExecuting(WorkbookHistoryAction historyAction)
Parameters
WorkbookHistoryAction historyAction

The history action.

Redo()

Reapplies the most recently undone action from the redo stack and returns whether the operation succeeded.

Declaration
public bool Redo()
Returns
System.Boolean

The value indicating whether the redo was successfully performed.

Undo()

Reverses the most recent action from the undo stack and returns whether the operation succeeded.

Declaration
public bool Undo()
Returns
System.Boolean

The value indicating whether the undo was successfully performed.

Events

Cleared

Raised when all history entries are removed from the undo and redo stacks.

Declaration
public event EventHandler Cleared
Event Type
System.EventHandler

RecordExecuted

Raised after a history record is committed to the undo stack, providing the recorded action details.

Declaration
public event EventHandler<WorkbookHistoryRecordExecutedEventArgs> RecordExecuted
Event Type
System.EventHandler<WorkbookHistoryRecordExecutedEventArgs>

RecordExecuting

Raised before a new history record begins recording, signaling the start of an undo group.

Declaration
public event EventHandler RecordExecuting
Event Type
System.EventHandler

RedoExecuted

Raised after a redo operation completes, providing the action that was reapplied.

Declaration
public event EventHandler<WorkbookHistoryEventArgs> RedoExecuted
Event Type
System.EventHandler<WorkbookHistoryEventArgs>

RedoExecuting

Raised before a redo operation begins, providing the action about to be reapplied.

Declaration
public event EventHandler<WorkbookHistoryEventArgs> RedoExecuting
Event Type
System.EventHandler<WorkbookHistoryEventArgs>

UndoExecuted

Raised after an undo operation completes, providing the action that was reversed.

Declaration
public event EventHandler<WorkbookHistoryEventArgs> UndoExecuted
Event Type
System.EventHandler<WorkbookHistoryEventArgs>

UndoExecuting

Raised before an undo operation begins, providing the action about to be reversed.

Declaration
public event EventHandler<WorkbookHistoryEventArgs> UndoExecuting
Event Type
System.EventHandler<WorkbookHistoryEventArgs>

Getting Started
  • Getting Started
Support Resources
  • Documentation
Community
  • Forums
  • Blogs
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.