Skip to main content
A newer version of this page is available.
All docs
V17.2

ASPxClientReportDesigner.CustomizeMenuActions Event

Enables you to customize the Web Report Designer’s menu actions.

Namespace: DevExpress.XtraReports.Web.Scripts

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

Declaration

public event ASPxClientReportDesignerCustomizeMenuActionsEventHandler CustomizeMenuActions

Event Data

The CustomizeMenuActions event's data class is ASPxClientCustomizeMenuActionsEventArgs. The following properties provide information specific to this event:

Property Description
Actions Provides access to the collection of actions available in the toolbar and menu.

The event data class exposes the following methods:

Method Description
GetById(String) Returns a menu action with the specified ID.

Remarks

The ASPxClientCustomizeMenuActionsEventArgs.Actions property of an event argument provides access to all commands available in the Report Designer Toolbar. To obtain an existing command, use the ASPxClientCustomizeElementsEventArgs.GetById method.

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 "Save" action and hide it
    var saveAction = e.GetById(DevExpress.Designer.Report.ActionId.Save);
    if (saveAction)
       saveAction.visible = false;

    //Add a new action
    actions.push({
        text: "Custom Command",
        imageClassName: "customButton",
        disabled: ko.observable(false),
        visible: true,
        hasSeparator: true,
        // The clickAction handler receives the client-side report model 
        // allowing you interact with the currently opened report on the client. 
        clickAction: function (report) {
            alert('Clicked');
        },
        hotKey: { ctrlKey: true, keyCode: "Z".charCodeAt(0) },
        container: "toolbar"
    });
}

For more information, see the Customizing the Report Designer Toolbar document.

See Also