dashboard-js-devexpress-dot-dashboard-dot-designer-7db6b3df.md
A Web Dashboard extension that adds the undo/redo buttons and allows users to keep track of user actions, and cancel or repeat them.
export class UndoRedoExtension extends DisposableObject
When registered, the UndoRedoExtension adds the undo/redo buttons to the designer toolbar.
To get access to the UndoRedoExtension settings, call the control’s findExtension(extensionName) method and pass the extension’s name as a parameter.
var ext = dashboardControl.findExtension('undoRedo');
To remove this item from the menu, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:
dashboardControl.unregisterExtension('undoRedo');
You can also call the control’s option method to change the extension options.
DisposableObject UndoRedoExtension
Initializes a new instance of the UndoRedoExtension class.
constructor(
dashboardControl: DevExpress.Dashboard.DashboardControl
)
| Name | Type | Description |
|---|---|---|
| dashboardControl | DashboardControl |
A Web Dashboard control that owns the extension.
|
Specifies whether the Web Dashboard has unsaved changes.
isChanged: ko.Computed<boolean>
| Type | Description |
|---|---|
| Computed<boolean> |
true, if the dashboard has unsaved changes; otherwise, false.
|
Specifies the unique extension name.
name: string
| Type | Description |
|---|---|
| string |
The unique extension name. The return value is undoRedo.
|
Use the undoRedo name in the following cases:
Warning
Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.
Allows you to process which key was pressed.
processKeyEvent(
keyEventType: DevExpress.Dashboard.KeyEventType,
eventArgs: JQueryKeyEventObject
): boolean
| Name | Type | Description |
|---|---|---|
| keyEventType | KeyEventType | |
| eventArgs | JQueryKeyEventObject |
A JQueryKeyEventObject object that identifies a key.
|
| Type | Description |
|---|---|
| boolean |
true , if a key used to undo the operation; otherwise, false.
|
Reapplies the last undone operation.
redo(): void
Specifies whether the Redo button is enabled.
redoEnabled(): boolean
| Type | Description |
|---|---|
| boolean |
true to enable the Redo button; otherwise, false.
|
Deletes all of the Undo and Redo history data.
reset(): void
Contains code that is executed when you register the dashboard extension.
start(): void
Contains code that is executed when you unregister the dashboard extension.
stop(): void
Undoes the last operation.
undo(): void
Specifies whether the Undo button is enabled.
undoEnabled(): boolean
| Type | Description |
|---|---|
| boolean |
true to enable the Undo button; otherwise, false.
|