dashboard-js-devexpress-dot-dashboard-dot-designer-260f127c.md
A Web Dashboard extension that allows you to save the current dashboard.
export class SaveDashboardExtension implements IExtension
When registered, the SaveDashboardExtension adds the “Save” item to the dashboard menu.
To get access to the SaveDashboardExtension settings, call the control’s findExtension(extensionName) method and pass the extension’s name as a parameter.
var ext = dashboardControl.findExtension('saveDashboard');
To remove this item from the menu, call the unregisterExtension(extensionNames) method and pass the extension’s name:
dashboardControl.unregisterExtension('saveDashboard');
You can also call the control’s option method to change the extension options.
IExtension
Initializes a new instance of the SaveDashboardExtension class.
constructor(
dashboardControl: DevExpress.Dashboard.DashboardControl
)
| Name | Type | Description |
|---|---|---|
| dashboardControl | DashboardControl |
A Web Dashboard control that owns the extension.
|
canSaveDashboard: ko.Computed<boolean>
| Type |
|---|
| Computed<boolean> |
Specifies an action executed at the moment of switching from Designer to Viewer.
designerToViewerAction: DevExpress.Dashboard.SequenceAction
| Type | Description |
|---|---|
| SequenceAction |
An action executed at the moment of switching from Designer to Viewer.
|
Specifies the unique extension name.
name: string
| Type | Description |
|---|---|
| string |
The unique extension name. The return value is saveDashboard.
|
Use the saveDashboard 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 invoke a custom function while you save a dashboard.
ensureDashboardSaved(
action: () => void
): void
| Name | Type | Description |
|---|---|---|
| action | () => void |
A function that is executed when the dashboard is about to be saved.
|
Calls the saveDashboard method.
performSaveDashboard(
dashboardId: string,
dashboardJson: string
): JQueryPromise<any>
| Name | Type | Description |
|---|---|---|
| dashboardId | string |
A string that identifies the dashboard.
| | dashboardJson | string |
A dashboard model encoded in the JSON format.
|
| Type | Description |
|---|---|
| JQueryPromise<any> |
A JQuery Promise object that is resolved after the action is completed.
|
Saves the current dashboard.
saveDashboard(): JQueryPromise<any>
| Type | Description |
|---|---|
| JQueryPromise<any> |
A JQuery Promise object that is resolved after the dashboard is saved.
|
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