Extending RadSpreadsheet Undo/Redo

1 Answer 30 Views
Spreadsheet
Ryan
Top achievements
Rank 1
Ryan asked on 03 Feb 2025, 09:09 PM

Hello,

I have an application where the user will drag object values from internal properties within the application into a Spreadsheet control. Think like a CAD package, the user would drag/drop something like circle's radius into a cell. These cells will automatically update as the application updates. I call these dynamic references DynamicDataFields.

The application maintains a collection of these DynamicDataFields. When the user drag/drops these fields from the application into a cell, that cell information is added to the collection.

It is a pretty simple solution and adding hooks for ActiveWorksheetEditor.Commands like Copy, Paste, Cut, Clear. RemoveCellsCommand, etc. - isn't too complicated. 

Basically, the application responds by either,

  1. Adding DynamicDataFields to the collection, or
  2. Removing DynamicDataFields to the collection. 

The biggest thing missing though, is how undo/redo get's handled. I am looking for ways to implement these two actions alongside the built-in undo redo system. Is this something that is possible? Where would I being looking? 

Or does anyone have any better ideas? 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 05 Feb 2025, 09:11 AM

Hello Ryan,

The RadSpreadsheet works with the RadSpreadProcessing document model, where the undo/redo functionality is exposed via its history feature. Currently, there is no entry point to customize the original undo/redo functionality. To get the desired behavior, you will need to write custom logic for your actions.

Regards,
Martin Ivanov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Spreadsheet
Asked by
Ryan
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or