Skip to main content

ReportDesignerPreviewClientSideEventsBuilder.CustomizeExportOptions(String) Method

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

Namespace: DevExpress.AspNetCore.Reporting.ReportDesigner

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

NuGet Package: DevExpress.AspNetCore.Reporting


public ReportDesignerPreviewClientSideEventsBuilder CustomizeExportOptions(
    string callback


Name Type Description
callback String

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


Type Description

A ReportDesignerPreviewClientSideEventsBuilder that can be used to further configure the Report Designer Preview’s client-side events.


The CustomizeExportOptions event allows you to customize available export formats and corresponding export options in the Document Viewer that is built into the Web Report Designer.

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 that provides the following methods:

  • HideExportOptionsPanel - Hides the entire Export Options panel.

    function customizeExportOptions(s, e) {
  • HideFormat - Hides the specified export format from the Export To drop-down list and the corresponding category from the Export Options panel.

    function customizeExportOptions(s, e) {
  • HideProperties - Hides the specified options for the specified export format from the Export Options panel. To remove all options for a particular export format, specify only the first method parameter.

    function customizeExportOptions(s, e) {            
        e.HideProperties(DevExpress.Reporting.Viewer.ExportFormatID.XLS, "ExportMode", "PageRange");
  • GetExportOptionsModel - Returns the export options model for the specified export format. You can then use this model to customize various export options, for instance, change a specific option’s default value.

    function customizeExportOptions(s, e) {     
        var model = e.GetExportOptionsModel(DevExpress.Reporting.Viewer.ExportFormatID.XLS);
    var designer = Html.DevExpress().ReportDesigner("reportDesigner1").Height("1000px")
        .DataSources(configureDS => { foreach (var ds in Model.DataSources) { configureDS.Add(ds.Key, ds.Value); } })
        .ClientSideEvents(configure => { configure.Preview(configure => { configure.CustomizeExportOptions("customizeExportOptions"); }); } );

To pass a required format to the methods listed above, use the DevExpress.Reporting.Viewer.ExportFormatID enumeration values: CSV, DOCX, HTML, Image, MHT, PDF, RTF, Text, XLS or XLSX.

See Also