ASPxClientWebDocumentViewer.CustomizeMenuActions Event

Enables you to customize the Web Document Viewer's menu actions.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll


public event ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler CustomizeMenuActions
Public Event CustomizeMenuActions As ASPxClientWebDocumentViewerCustomizeMenuActionsEventHandler

The ASPxClientCustomizeMenuActionsEventArgs.Actions property of an event argument provides access to all commands available in the Web Document Viewer's Toolbar. To obtain an existing command, use the ASPxClientCustomizeElementsEventArgs.GetById method. Refer to Document Viewer's Client-Side API for a complete list of available commands.

The code below demonstrates the CustomizeMenuActions event handler that hides an existing command and registers a custom one.

function CustomizeMenuActions(s, e) {
    var actions = e.Actions;

    // Get the "Print Page" action and hide it. 
    var printPageAction = e.GetById(DevExpress.Report.Preview.ActionId.PrintPage);
    if (printPageAction)
        printPageAction.visible = false;

    // Add a new action. 
        text: "Custom Command",
        imageClassName: "customButton",
        hasSeparator: false,
        disabled: ko.observable(false),
        visible: true,
        hotKey: { ctrlKey: true, keyCode: "Z".charCodeAt(0) },
        clickAction: function () {

For more information, see Customize the Document Viewer Toolbar.

See Also