Back to Devexpress

WebDocumentViewerClientSideEventsBuilder.CustomizeExportOptions(String) Method

xtrareports-devexpress-dot-aspnetcore-dot-reporting-dot-webdocumentviewer-dot-webdocumentviewerclientsideeventsbuilder-dot-customizeexportoptions-x28-system-dot-string-x29.md

latest4.9 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.AspNetCore.Reporting

Declaration

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

Parameters

NameTypeDescription
callbackString

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

|

Returns

TypeDescription
WebDocumentViewerClientSideEventsBuilder

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

|

Remarks

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")
        .Height("1000px")
        .ClientSideEvents(configure => {
        configure.CustomizeExportOptions("customizeExportOptions");
        })
        .Bind("TestReport");
}
@documentViewer

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:

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

See Also

WebDocumentViewerClientSideEventsBuilder Class

WebDocumentViewerClientSideEventsBuilder Members

DevExpress.AspNetCore.Reporting.WebDocumentViewer Namespace