Skip to main content

OpenDashboardExtension Class

A Web Dashboard extension that allows you to open the created dashboards.

#Declaration

TypeScript
export class OpenDashboardExtension implements IExtension

#Remarks

When registered, the OpenDashboardExtension adds the “Open…” item to the dashboard menu.

To get access to the OpenDashboardExtension settings, call the control’s findExtension(extensionName) method and pass the extension’s name as a parameter.

JavaScript
var ext = dashboardControl.findExtension('openDashboard');

To remove this item from the menu, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:

JavaScript
dashboardControl.unregisterExtension('openDashboard');

You can also call the control’s option method to change the extension options.

#Implements

IExtension

#constructor(dashboardControl)

Initializes a new instance of the OpenDashboardExtension class.

#Declaration

TypeScript
constructor(
    dashboardControl: DevExpress.Dashboard.DashboardControl
)

#Parameters

Name Type Description
dashboardControl DashboardControl

A Web Dashboard control that owns the extension.

#Properties

#name Property

Specifies the unique extension name.

#Declaration

TypeScript
name: string

#Property Value

Type Description
string

The unique extension name. The return value is openDashboard.

#Remarks

Use the openDashboard name in the following cases:

  • Call the DashboardControl.findExtension method and pass the extension name as a parameter to access the extension.
  • Call the control’s option method to change the extension options.

Warning

Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.

#Methods

#loadDashboard(dashboardId) Method

Loads the dashboard from the dashboard storage.

#Declaration

TypeScript
loadDashboard(
    dashboardId: string
): JQueryPromise<any>

#Parameters

Name Type Description
dashboardId string

A string that is a dashboard unique identifier.

#Returns

Type Description
JQueryPromise<any>

A JQuery Promise object that is resolved after the dashboard is loaded.

#start Method

Contains code that is executed when you register the dashboard extension.

#Declaration

TypeScript
start(): void

#stop Method

Contains code that is executed when you unregister the dashboard extension.

#Declaration

TypeScript
stop(): void