dashboard-js-devexpress-dot-dashboard-06087c1f.md
The Web Dashboard extension.
export interface IExtension
The JavaScript extensions allow you to customize and provide certain functionality to the Web Dashboard control. You can include or exclude the required control functionality using extensions.
Show 21 items
IExtension AvailableDataSourcesExtension
AvailableFontFamiliesExtension
DashboardColorSchemeEditorExtension
DashboardCurrencyEditorExtension
DashboardParameterEditorExtension
Specifies an action executed at the moment of switching from Designer to Viewer.
designerToViewerAction?: SequenceAction
| Type | Description |
|---|---|
| SequenceAction |
Specifies 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.
|
Warning
Do not change the unique name of the extension registered in the Web Dashboard to avoid exceptions.
Specifies an action executed at the moment of switching from Viewer to Designer.
viewerToDesignerAction?: SequenceAction
| Type | Description |
|---|---|
| SequenceAction |
An action executed at the moment of switching from Viewer to Designer.
|
Allows you to process which key was pressed.
processKeyEvent?(
keyEventType: KeyEventType,
eventArgs: JQueryKeyEventObject
): boolean
| Name | Type | Description |
|---|---|---|
| keyEventType | KeyEventType |
The KeyEventType object that identifies a user interaction with the keyboard.
| | eventArgs | JQueryKeyEventObject |
A JQueryKeyEventObject object that identifies a key.
|
| Type | Description |
|---|---|
| boolean |
A bool value.
|
Contains code that is executed when you register the dashboard extension.
start?(): void
Use the stop method to describe code that is invoked when you unregister the dashboard extension.
The code snippet below demonstrates how to describe adding the custom ‘Save As’ extension to the Web Dashboard when you register it in the control, and how to describe removing the created extension when you unregister it.
// ...
function SaveAsDashboardExtension(dashboardControl) {
this.name = "save-as";
this.toolbox = this.dashboardControl.findExtension("toolbox");
this._menuSaveAsItem = new DevExpress.Dashboard.DashboardMenuItem("save-as", "Save As...", 120, 0, function() { /*...*/ });
}
SaveAsDashboardExtension.start = function () {
this.toolbox.menuItems.push(this._menuSaveAsItem);
};
SaveAsDashboardExtension.stop = function () {
this.toolbox.menuItems.remove(this._menuSaveAsItem);
};
// ...
Note
To register or unregister extensions from the Web Dashboard control, use the registerExtension(extensions) and unregisterExtension(extensionNames) methods, respectively.
Refer to the Manipulating an observableArray section in the KnockoutObservableArray for more information about knockout methods.
Contains code that is executed when you unregister the dashboard extension.
stop?(): void
Use the start method to describe code that is invoked when you register the dashboard extension.
The code snippet below demonstrates how to describe adding the custom ‘Save As’ extension to the Web Dashboard when you register it in the control, and how to describe removing the created extension when you unregister it.
// ...
function SaveAsDashboardExtension(dashboardControl) {
this.name = "save-as";
this.toolbox = this.dashboardControl.findExtension("toolbox");
this._menuSaveAsItem = new DevExpress.Dashboard.DashboardMenuItem("save-as", "Save As...", 120, 0, function() { /*...*/ });
}
SaveAsDashboardExtension.start = function () {
this.toolbox.menuItems.push(this._menuSaveAsItem);
};
SaveAsDashboardExtension.stop = function () {
this.toolbox.menuItems.remove(this._menuSaveAsItem);
};
// ...
Note
To register or unregister extensions from the Web Dashboard control, use the registerExtension(extensions) and unregisterExtension(extensionNames) methods, respectively.
Refer to the Manipulating an observableArray section in the KnockoutObservableArray for more information about knockout methods.