Skip to main content

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.v24.1.dll

NuGet Package: DevExpress.AspNetCore.Reporting


public WebDocumentViewerClientSideEventsBuilder CustomizeExportOptions(
    string callback


Name Type Description
callback String

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


Type Description

A WebDocumentViewerClientSideEventsBuilder that can be used to configure the Document Viewer’s client-side events.


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

The following code specifies customizeExportOptions handler function for the CustomizeExportOptions event:

    var documentViewer = Html.DevExpress().WebDocumentViewer("webDocumentViewer1")
        .ClientSideEvents(configure => {

The handler function receives two parameters - the first parameter is the client-side DocumentViewer object, the second parameter is the ASPxClientCustomizeExportOptionsEventArgs object with the following methods:

  • HideExportOptionsPanel - Hides the Export Options panel.

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

    function customizeExportOptions(s, e) {
  • HideProperties - 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.

    function customizeExportOptions(s, e) {            
        e.HideProperties(DevExpress.Reporting.Viewer.ExportFormatID.XLS, "ExportMode", "PageRange");
  • GetExportOptionsModel - Returns the export options model for the specified export format. Use this model to change the option’s default value.

    function customizeExportOptions(s, e) {     
        var model = e.GetExportOptionsModel(DevExpress.Reporting.Viewer.ExportFormatID.XLS);

To specify a document format in the method’s parameter, use the ExportFormatID enumeration value.

See Also