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

WebDocumentViewerClientSideEventsBuilder.CustomizeExportOptions(String) Method

Sets the name of the JavaScript function or the entire code that will handle the Web Document Viewer's CustomizeExportOptions client-side event.

Namespace: DevExpress.AspNetCore.Reporting.WebDocumentViewer

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


public WebDocumentViewerClientSideEventsBuilder CustomizeExportOptions(
    string callback
Public Function CustomizeExportOptions(
    callback As String
) As WebDocumentViewerClientSideEventsBuilder


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 WebDocumentViewerClientSideEventsBuilder that can be used to further configure the Document Viewer's client-side events.


The CustomizeExportOptions event allows you to customize available export formats and corresponding export options in the Web Document Viewer.

When implementing a handling function, use the objects passed as parameters. The first parameter passes the event sender that is the ClientDocumentViewer 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.Report.Preview.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.Report.Preview.ExportFormatID.XLS);
    var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
        .ClientSideEvents(configure => { configure.CustomizeExportOptions("customizeExportOptions"); });

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

See Also