Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IAction Interface

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

#Declaration

TypeScript
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

TypeScript
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

TypeScript
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

TypeScript
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

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

#Property Value

Type
any

#getViewModel Property

#Declaration

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

#Property Value

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

#group Property

#Declaration

TypeScript
group?: () => string

#Property Value

Type
() => string

#hasSeparator Property

Specifies whether the command has a visual separator.

#Declaration

TypeScript
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

TypeScript
hotKey?: IHotKey | IHotKey[]

#Property Value

Type Description
IHotKey

The keyboard shortcut.

IHotKey[]

#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

TypeScript
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

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

#Property Value

Type Description
any

The name of the HTML template.

#isContextMenuAction Property

#Declaration

TypeScript
isContextMenuAction?: boolean

#Property Value

Type
boolean

#selected Property

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

#Declaration

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

#Property Value

Type
any

#text Property

Provides access to the text for the command.

#Declaration

TypeScript
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

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

#Property Value

Type Description
any

true if the command is visible; otherwise false.