Skip to main content

IAction Interface

Provides information about a command available in the toolbar or menu.

Declaration

export interface IAction

Remarks

See Customize the Report Designer Toolbar and Customize the Document Viewer Toolbar for more information.

Properties

clickAction Property

Provides access to the action performed when a button is clicked.

Declaration

clickAction?: (model?: any) => void

Property Value

Type Description
(model?: any) => void

The action performed when a button is clicked.

container Property

Provides access to a value that specifies the command location.

Declaration

container?: string

Property Value

Type Description
string

A string that specifies the command location.

Remarks

If the command is displayed on the designer menu, then this property returns “menu“. If the command is displayed on the toolbar, the “toolbar“ value is returned.

contentData Property

Declaration

contentData?: any

Property Value

Type
any

disabled Property

Provides access to the value that specifies whether or not the command is disabled by default.

Declaration

disabled?: Observable<boolean> | Computed<boolean> | boolean

Property Value

Type
any

getViewModel Property

Declaration

getViewModel?: (parent: DevExpress.Analytics.Internal.ActionListsBase, index: number) => IActionViewModel

Property Value

Type
(parent: ActionListsBase, index: number) => IActionViewModel

group Property

Declaration

group?: () => string

Property Value

Type
() => string

hasSeparator Property

Specifies whether the command has a visual separator.

Declaration

hasSeparator?: boolean

Property Value

Type Description
boolean

true, if the command has a visual separator; otherwise, false.

hotKey Property

Provides access to the keyboard shortcut used to invoke the command.

Declaration

hotKey?: IHotKey

Property Value

Type Description
IHotKey

The keyboard shortcut.

Remarks

Handle the CustomizeMenuActions client-side event to get the Action object. Use the hotKey property to specify a key that the user presses to run the action.

Example

The following event handler function disables the hotkey (F) for the Search command. When the user presses the F key, the Search panel does not appear:

JavaScript

function customizeMenuActions(s, e) {
    var searchAction = e.GetById(DevExpress.Reporting.Viewer.ActionId.Search); 
    if (searchAction)
    searchAction.hotKey = null;
}

Angular

<dx-report-viewer [reportUrl]="reportUrl">
    <dxrv-callbacks (CustomizeMenuActions)="CustomizeMenuActions($event)"></dxrv-callbacks>
</dx-report-viewer>

Note

To use ActionId constants in typescript code, add the following directive:

import { ActionId } from "devexpress-reporting/viewer/constants";

imageClassName Property

Provides access to the CSS class of the command’s icon.

Declaration

imageClassName?: Observable<string> | Computed<string> | string

Property Value

Type Description
any

The name of the CSS class.

imageTemplateName Property

Provides access to the HTML template of the command’s icon.

Declaration

imageTemplateName?: Observable<string> | Computed<string> | string

Property Value

Type Description
any

The name of the HTML template.

isContextMenuAction Property

Declaration

isContextMenuAction?: boolean

Property Value

Type
boolean

selected Property

Provides access to the value that specifies whether the command is selected.

Declaration

selected?: Observable<boolean> | Computed<boolean> | boolean

Property Value

Type
any

text Property

Provides access to the text for the command.

Declaration

text?: string

Property Value

Type Description
string

A string that is the command text.

visible Property

Provides access to the value that specifies whether the command is visible in the user interface.

Declaration

visible?: Observable<boolean> | Computed<boolean> | boolean

Property Value

Type Description
any

true if the command is visible; otherwise false.