IExtension Interface
The Web Dashboard extension.
Declaration
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.
Properties
designerToViewerAction Property
Declaration
designerToViewerAction?: SequenceAction
Property Value
name Property
Specifies a unique extension name.
Declaration
name: string
Property Value
Type |
Description |
string |
A unique extension name.
|
Warning
Do not change a unique name of the extension registered in the Web Dashboard in order to avoid exceptions.
viewerToDesignerAction Property
Declaration
viewerToDesignerAction?: SequenceAction
Property Value
Methods
processKeyEvent(keyEventType, eventArgs) Method
Allows you to process which key was pressed.
Declaration
processKeyEvent?(keyEventType: KeyEventType, eventArgs: JQueryKeyEventObject): boolean
Parameters
Returns
Type |
Description |
boolean |
A bool value.
|
start Method
Contains code that is executed when you register the dashboard extension.
Declaration
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);
};
// ...
Refer to the Manipulating an observableArray section in the KnockoutObservableArray for more information about knockout methods.
stop Method
Contains code that is executed when you unregister the dashboard extension.
Declaration
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);
};
// ...
Refer to the Manipulating an observableArray section in the KnockoutObservableArray for more information about knockout methods.