Skip to main content
All docs
V18.2

ASPxClientReportDesigner.CustomizeMenuActions Event

Enables you to customize the Web Report Designer’s toolbar commands.

Namespace: DevExpress.XtraReports.Web.Scripts

Assembly: DevExpress.XtraReports.v18.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 event argument provides access to the Actions collection that contains all the available Report Designer commands. You can add new commands to the collection and modify the existing commands. To obtain an existing command, call the event argument’s GetById method and pass the command ID as a parameter.

The following example demonstrates how to hide the existing Validate Bindings toolbar command and add a new Refresh command that refreshes the current report tab.

<script type="text/javascript">
    function customizeActions(s, e) {

        // Get the "Validate Bindings" action and hide it.
        var validateBindingsAction = e.GetById(DevExpress.Designer.Report.ActionId.ValidateBindings);
        if (validateBindingsAction)
            validateBindingsAction.visible = false;

        // Add a new action.
        e.Actions.push({
            text: "Refresh",
            imageTemplateName: "refresh",
            visible: true,
            disabled: false,
            hasSeparator: false,
            hotKey: { ctrlKey: true, keyCode: "Z".charCodeAt(0) },
            clickAction: function () {
                reportDesigner.GetCurrentTab().refresh();
            }
        });
    }
</script>
<dx:ASPxReportDesigner ID="ASPxReportDesigner1" ClientInstanceName="reportDesigner" runat="server">
    <ClientSideEvents CustomizeMenuActions="customizeActions" />
</dx:ASPxReportDesigner>

See the following topics for more information:

See Also