All docs
V21.1
21.1
20.2
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

DxDocumentViewerCallbacks.CustomizeExportOptions Property

Specifies the handler for the CustomizeExportOptions client-side event that allows you hide export formats and specify the default export options.

Namespace: DevExpress.Blazor.Reporting

Assembly: DevExpress.Blazor.Reporting.v21.1.JSBasedControls.dll

Declaration

[Parameter]
public string CustomizeExportOptions { get; set; }

Property Value

Type Description
String

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

Remarks

The CustomizeExportOptions event allows you to hide export formats and specify the default export options in the Web Document Viewer.

The handler function receives two parameters - the first parameter is the client-side Document Viewer (the event sender) that exposes the dx property to access the client-side DevExpress objects. The second parameter is an object with the following properties and methods:

  • HideExportOptionsPanel method
    Hides the Export Options panel.

  • HideFormat method
    Hides the specified export format from the Export To drop-down list and also hides its related category from the Export Options panel.

  • HideProperties method
    Hides the specified options for the export format in the Export Options panel. To remove all options for a particular export format, specify only the first method parameter.

  • GetExportOptionsModel method
    Returns the export options model for the specified export format. Use this model to change the option’s default value.

The code sample below does the following:

  • removes the CSV format from the list of available export formats and from the Options tab;
  • removes the TXT format from the list of available export formats and from the Options tab;
  • hides the “ExportMode” and “PageRange” options for the XLS format;
  • removes the RTF section from the Options tab;
  • specifies “false” as the ExportHyperlinks option’s default value for XLS export.
window.ReportingViewerCustomization = {
    onCustomizeExportOptions: function (s, e) {
        // Remove CSV export.
        e.HideFormat(s.dx.Reporting.Viewer.ExportFormatID.CSV);
        // Remove Text export
        e.HideFormat({ format: s.dx.Reporting.Viewer.ExportFormatID.TXT, propertyName: "textExportOptions" });
        // Do not show the ExportMode and PageRange property editors in the XLSX Export Options section. 
        e.HideProperties(s.dx.Reporting.Viewer.ExportFormatID.XLSX, "ExportMode", "PageRange");
        // Hide the RTF Export Options section.
        e.HideProperties(s.dx.Reporting.Viewer.ExportFormatID.RTF)
        // Clear the Export Hyperlinks checkbox in the XLS Export Options section.
        var model = e.GetExportOptionsModel(s.dx.Reporting.Viewer.ExportFormatID.XLS);
        model.exportHyperlinks(false)
    }
}
See Also