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.

disabled Property

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

Declaration

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

Property Value

Type
Observable<boolean>
Computed<boolean>

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.

Examples

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:

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

imageClassName Property

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

Declaration

imageClassName: any

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?: any

Property Value

Type Description
any

The name of the HTML template.

selected Property

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

Declaration

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

Property Value

Type
Observable<boolean>
Computed<boolean>

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?: any

Property Value

Type Description
any

true if the command is visible; otherwise false.