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
)
Public Function CustomizeMenuActions(
    callback As String
) As ReportDesignerClientSideEventsBuilder

Parameters

Type Name Description
String callback

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.

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 code sample below demonstrates how to hide an existing Action and register a custom one.

@{
    var designer = Html.DevExpress().ReportDesigner("reportDesigner1").Height("1000px")
        .Bind(Model.Report)
        .DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } })
        .ClientSideEvents(configure => { configure.CustomizeMenuActions("customizeMenuActions"); });
}
@designer

See Also