The requested page is not available for the requested platform. You are viewing the content for Default platform.

ReportDesignerClientSideEventsBuilder.CustomizeSaveAsDialog(String) Method

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

Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner

Assembly: DevExpress.AspNetCore.Reporting.v19.1.dll

Declaration

public ReportDesignerClientSideEventsBuilder CustomizeSaveAsDialog(
    string callback
)
Public Function CustomizeSaveAsDialog(
    callback As String
) As ReportDesignerClientSideEventsBuilder

Parameters

Name Type Description
callback String

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

Returns

Type Description
ReportDesignerClientSideEventsBuilder

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

Remarks

The Save Report dialog appears in the Web Report Designer when saving a report (e.g., when an end-user clicks the Save As menu command). The CustomizeSaveAsDialog event enables you to change this dialog's settings. 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.

  • Popup
    The Save Report dialog object.

  • Customize
    This method allows you to modify the Save Report dialog based on the specified template and model.

The code sample below demonstrates how to display your report storage data in a custom way within the Save Report dialog.

  • Use the Popup field of the event handler's second parameter to customize the dialog's width, height and title.

  • Create a dialog model that provides functions to set and get the report URL, a function to be executed when showing this dialog and buttons to be displayed in the dialog.

  • Write custom logic to display reports from your server-side storage.

  • Define an HTML template for your dialog.

  • Use the Customize method of the object passed as the event handler's second parameter, to modify the Save Report dialog based on the specified model and template.

For this example to work correctly, reports in your storage should be divided into categories. The ReportStorageWebExtension.GetUrls method should return a dictionary with report URLs and display names in the following format: "CategoryName\ReportName".

@{
    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.CustomizeSaveAsDialog("customizeSaveAsDialog"); });
}
@designer
See Also