Skip to main content
A newer version of this page is available. .

ReportDesignerClientSideEventsBuilder.CustomizeMenuActions(String) Method

Sets the name of the JavaScript function or the entire code that will handle the Web Report Designer‘s CustomizeMenuActions client-side event.

Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly: DevExpress.AspNetCore.Reporting.v18.2.dll

Declaration

public ReportDesignerClientSideEventsBuilder CustomizeMenuActions(
    string callback
)

Parameters

Name Type Description
callback String

The name of a JavaScript function or the entire JavaScript function code used to handle the CustomizeMenuActions event.

Returns

Type Description
ReportDesignerClientSideEventsBuilder

A ReportDesignerClientSideEventsBuilder that can be used to further configure the Report Designer Client Side Events.

Remarks

The CustomizeMenuActions event enables you to customize the Web Report Designer’s menu actions. When implementing a handling function, use the objects passed as parameters. The first parameter passes the event sender that is the ClientReportDesigner object. The second one is an object with the following structure.

  • Actions
    A collection of Actions available in the Web Report Designer Toolbar.

  • GetById
    This method allows you to obtain the required Action by its ID. The following Action IDs are available:

    • DevExpress.Designer.ActionId.Cut,
    • DevExpress.Designer.ActionId.Copy,
    • DevExpress.Designer.ActionId.Paste,
    • DevExpress.Designer.ActionId.Delete,
    • DevExpress.Designer.ActionId.Undo,
    • DevExpress.Designer.ActionId.Redo,
    • DevExpress.Designer.ActionId.ZoomOut,
    • DevExpress.Designer.ActionId.ZoomSelector,
    • DevExpress.Designer.ActionId.ZoomIn,
    • DevExpress.Designer.Report.ActionId.NewReport,
    • DevExpress.Designer.Report.ActionId.NewReportViaWizard,
    • DevExpress.Designer.Report.ActionId.OpenReport,
    • DevExpress.Designer.Report.ActionId.ReportWizard,
    • DevExpress.Designer.Report.ActionId.Preview,
    • DevExpress.Designer.Report.ActionId.Scripts,
    • DevExpress.Designer.Report.ActionId.AddDataSource,
    • DevExpress.Designer.Report.ActionId.AddSqlDataSource,
    • DevExpress.Designer.Report.ActionId.AddMultiQuerySqlDataSource,
    • DevExpress.Designer.Report.ActionId.Save,
    • DevExpress.Designer.Report.ActionId.SaveAs,
    • DevExpress.Designer.Report.ActionId.Exit.

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.

@{
    var reportDesigner = Html.DevExpress().ReportDesigner("reportDesigner1")
        .Height("1000px")
        .Bind("Report")
        .ClientSideEvents(configure => { configure.CustomizeMenuActions("customizeActions"); });
}
@reportDesigner

See Customize the Report Designer Toolbar for more information.

See Also