Skip to main content

OptionsPanelExtension Class

An extension that is the dashboard item’s Options menu containing specific options and settings related to the current dashboard item.

#Declaration

TypeScript
export class OptionsPanelExtension implements ISupportOptionExtension<OptionsPanelExtensionOptions>

#Remarks

When registered, the OptionsPanelExtension adds the Options panel to the dashboard item’s menu.

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

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

To disable the current panel, call the unregisterExtension(extensionNames) method and pass the extension’s unique name as a parameter:

JavaScript
dashboardControl.unregisterExtension('itemOptionsPanel');

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

#Implements

ISupportOptionExtension

#constructor(dashboardControl)

Initializes a new instance of the OptionsPanelExtension class.

#Declaration

TypeScript
constructor(
    dashboardControl: DevExpress.Dashboard.DashboardControl,
    options?: OptionsPanelExtensionOptions
)

#Parameters

Name Type Description
dashboardControl DashboardControl

A Web Dashboard control that owns the extension.

options OptionsPanelExtensionOptions

#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 ‘itemOptionsPanel’.

#Remarks

Warning

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

#off Property

Unsubscribes from the OptionsPanelExtension’s events.

#Declaration

TypeScript
off: DevExpress.Dashboard.Internal.EventSubscriber<OptionsPanelExtensionEvents>

#Property Value

Type
EventSubscriber<OptionsPanelExtensionEvents>

#on Property

Subscribes to OptionsPanelExtension events.

#Declaration

TypeScript
on: DevExpress.Dashboard.Internal.EventSubscriber<OptionsPanelExtensionEvents>

#Property Value

Type
EventSubscriber<OptionsPanelExtensionEvents>

#Remarks

The extension’s on and off methods help you subscribe to and unsubscribe from events.

#Methods

#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